Skip to content

Commit

Permalink
refactor: expr_map_impl now caches the value
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Jun 7, 2024
1 parent d87bb70 commit 7fbc52d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/include/mp-units/framework/expression_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ template<template<typename> typename Proj, template<typename...> typename To, ty
expr_type_projectable<Proj>... Dens>
[[nodiscard]] consteval auto expr_map_impl(type_list<Nums...>, type_list<Dens...>)
{
return (OneType{} * ... * map_power(typename expr_type_map<Nums, Proj>::type{})) /
(OneType{} * ... * map_power(typename expr_type_map<Dens, Proj>::type{}));
return decltype(decltype((OneType{} * ... * map_power(typename expr_type_map<Nums, Proj>::type{}))){} /
decltype((OneType{} * ... * map_power(typename expr_type_map<Dens, Proj>::type{}))){}){};
}

/**
Expand Down

0 comments on commit 7fbc52d

Please sign in to comment.