3
0
mirror of https://github.com/triqs/dft_tools synced 2025-01-12 14:08:24 +01:00

arrays: a forgotten std::forward in lazy evaluations...

A(i_,0) was not compiling due to a missing forward ...
This commit is contained in:
Olivier Parcollet 2014-03-28 17:20:16 +01:00
parent 9c979ceb0b
commit 5267798b48

View File

@ -263,21 +263,21 @@ namespace triqs { namespace arrays {
typename clef::_result_of::make_expr_call<indexmap_storage_pair const &,Args...>::type
operator()( Args&&... args ) const & {
static_assert(sizeof...(Args) <= indexmap_type::rank, "Incorrect number of variable in call");// not perfect : ellipsis ...
return make_expr_call(*this,args...);
return make_expr_call(*this,std::forward<Args>(args)...);
}
template< typename... Args>
typename clef::_result_of::make_expr_call<indexmap_storage_pair &,Args...>::type
operator()( Args&&... args ) & {
static_assert(sizeof...(Args) <= indexmap_type::rank, "Incorrect number of variable in call");// not perfect : ellipsis ...
return make_expr_call(*this,args...);
return make_expr_call(*this,std::forward<Args>(args)...);
}
template< typename... Args>
typename clef::_result_of::make_expr_call<indexmap_storage_pair,Args...>::type
operator()( Args&&... args ) && {
static_assert(sizeof...(Args) <= indexmap_type::rank, "Incorrect number of variable in call");// not perfect : ellipsis ...
return make_expr_call(std::move(*this),args...);
return make_expr_call(std::move(*this),std::forward<Args>(args)...);
}
// ------------------------------- clef auto assign --------------------------------------------