From 33a19227ab62993dca13053e3a858b3f57813978 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Thu, 26 Sep 2013 15:54:07 +0200 Subject: [PATCH] arrays: length of domain corrected for && --- triqs/arrays/indexmaps/cuboid/domain.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/triqs/arrays/indexmaps/cuboid/domain.hpp b/triqs/arrays/indexmaps/cuboid/domain.hpp index 24e6f75e..2d608321 100644 --- a/triqs/arrays/indexmaps/cuboid/domain.hpp +++ b/triqs/arrays/indexmaps/cuboid/domain.hpp @@ -64,8 +64,12 @@ namespace triqs { namespace arrays { namespace indexmaps { namespace cuboid { size_t number_of_elements() const { return lengths_.product_of_elements();} bool operator==(domain_t const & X) const { return this->lengths_ == X.lengths_;} bool operator!=(domain_t const & X) const { return !(*this==X);} - n_uple const & lengths() const { return lengths_;} - +#ifdef TRIQS_COMPILER_IS_C11_COMPLIANT + n_uple const & lengths() const & { return lengths_;} + n_uple lengths() && { return lengths_;} +#else + n_uple lengths() const { return lengths_;} +#endif /** Generates the value of the indices of a cuboid_domain. */ static constexpr ull_t iteration_order_default = permutations::identity(Rank); template