diff --git a/triqs/arrays/expression_template/array_algebra.hpp b/triqs/arrays/expression_template/array_algebra.hpp index f119879c..5e656477 100644 --- a/triqs/arrays/expression_template/array_algebra.hpp +++ b/triqs/arrays/expression_template/array_algebra.hpp @@ -31,6 +31,10 @@ namespace triqs { namespace arrays { template struct get_call_const_return_type { typedef decltype(std::declval()(0,0,0)) type; }; template struct get_call_const_return_type { typedef decltype(std::declval()(0,0,0,0)) type; }; template struct get_call_const_return_type { typedef decltype(std::declval()(0,0,0,0,0)) type; }; + template struct get_call_const_return_type { typedef decltype(std::declval()(0,0,0,0,0,0)) type; }; + template struct get_call_const_return_type { typedef decltype(std::declval()(0,0,0,0,0,0,0)) type; }; + template struct get_call_const_return_type { typedef decltype(std::declval()(0,0,0,0,0,0,0,0)) type; }; + template struct get_call_const_return_type { typedef decltype(std::declval()(0,0,0,0,0,0,0,0,0)) type; }; template struct array_expr : TRIQS_CONCEPT_TAG_NAME(ImmutableArray) { diff --git a/triqs/arrays/expression_template/matrix_algebra.hpp b/triqs/arrays/expression_template/matrix_algebra.hpp index 6b043902..90479704 100644 --- a/triqs/arrays/expression_template/matrix_algebra.hpp +++ b/triqs/arrays/expression_template/matrix_algebra.hpp @@ -69,10 +69,12 @@ namespace triqs { namespace arrays { typedef typename std::remove_reference::type L_t; typedef typename std::remove_reference::type R_t; static_assert( get_rank::value==0 || get_rank::value==0 || get_rank::value == get_rank::value, "rank mismatch in matrix operations"); - typedef typename std::result_of(typename L_t::value_type,typename R_t::value_type)>::type value_type; + //typedef typename std::result_of(typename L_t::value_type,typename R_t::value_type )>::type value_type; typedef typename std::remove_cv< typename std::remove_reference::type>::type>::type domain_type; L l; R r; + using value_type = decltype(utility::operation()(l(0, 0), r(0, 0))); + template matrix_expr(LL && l_, RR && r_) : l(std::forward(l_)), r(std::forward(r_)) {} domain_type domain() const { return combine_domain()(l,r); } diff --git a/triqs/arrays/expression_template/vector_algebra.hpp b/triqs/arrays/expression_template/vector_algebra.hpp index 0bfc7821..21950921 100644 --- a/triqs/arrays/expression_template/vector_algebra.hpp +++ b/triqs/arrays/expression_template/vector_algebra.hpp @@ -29,10 +29,12 @@ namespace triqs { namespace arrays { typedef typename std::remove_reference::type L_t; typedef typename std::remove_reference::type R_t; static_assert( get_rank::value==0 || get_rank::value==0 || get_rank::value == get_rank::value, "rank mismatch in array operations"); - typedef typename std::result_of(typename L_t::value_type,typename R_t::value_type)>::type value_type; + //typedef typename std::result_of(typename L_t::value_type,typename R_t::value_type)>::type value_type; typedef typename std::remove_reference::type>::type domain_type; L l; R r; + using value_type = decltype(utility::operation()(l(0), r(0))); + template vector_expr(LL && l_, RR && r_) : l(std::forward(l_)), r(std::forward(r_)) {} domain_type domain() const { return combine_domain()(l,r); }