mirror of
https://github.com/triqs/dft_tools
synced 2025-01-12 05:58:18 +01:00
arrays: add lazy call to matrix_tensor_proxy
- correction to previous patch
This commit is contained in:
parent
e1e9ee20fd
commit
4ae4dfd42b
@ -60,7 +60,12 @@ namespace arrays {
|
||||
value_type *restrict data_start() { return &storage()[indexmap().start_shift()]; }
|
||||
|
||||
view_type operator()() const { return *this; }
|
||||
template <typename... Args> value_type const &operator()(Args &&... args) const { return a(n, std::forward<Args>(args)...); }
|
||||
|
||||
template <typename... Args>
|
||||
std::c14::enable_if_t<!triqs::clef::is_any_lazy<Args...>::value, value_type const &> operator()(Args &&... args) const {
|
||||
return a(n, std::forward<Args>(args)...);
|
||||
}
|
||||
TRIQS_CLEF_IMPLEMENT_LAZY_CALL();
|
||||
|
||||
template <typename RHS> const_matrix_tensor_proxy &operator=(const RHS &X) =delete; // can not assign to a const
|
||||
|
||||
@ -109,7 +114,13 @@ namespace arrays {
|
||||
value_type *restrict data_start() { return &storage()[indexmap().start_shift()]; }
|
||||
|
||||
view_type operator()() const { return *this; }
|
||||
template <typename... Args> value_type &operator()(Args &&... args) const { return a(n, std::forward<Args>(args)...); }
|
||||
|
||||
template <typename... Args>
|
||||
std::c14::enable_if_t<!triqs::clef::is_any_lazy<Args...>::value, value_type &> operator()(Args &&... args) const {
|
||||
return a(n, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
TRIQS_CLEF_IMPLEMENT_LAZY_CALL();
|
||||
|
||||
template <typename RHS> matrix_tensor_proxy &operator=(const RHS &X) {
|
||||
triqs_arrays_assign_delegation(*this, X);
|
||||
|
Loading…
Reference in New Issue
Block a user