diff --git a/include/boost/multi/detail/layout.hpp b/include/boost/multi/detail/layout.hpp index bf5de5d7d..134aa4eb1 100644 --- a/include/boost/multi/detail/layout.hpp +++ b/include/boost/multi/detail/layout.hpp @@ -157,7 +157,8 @@ struct extensions_t : boost::multi::detail::tuple_prepend_t::extensions_type const& other) : extensions_t(multi::detail::ht_tuple(extension, other.base())) {} - constexpr auto base() const& -> base_ const& {return *this;} // impl_;} + constexpr auto base() const& -> base_ const& { return *this; } // impl_;} + constexpr auto base() & -> base_ & { return *this; } // impl_;} friend constexpr auto operator*(index_extension const& extension, extensions_t const& self) -> extensions_t { // return extensions_t(tuple(extension, self.base())); @@ -292,7 +293,8 @@ template<> struct extensions_t<0> : tuple<> { extensions_t() = default; - constexpr auto base() const -> base_ const& {return *this;} + constexpr auto base() const& -> base_ const& { return *this; } + constexpr auto base() & -> base_ & { return *this; } template static void serialize(Archive&/*ar*/, unsigned /*version*/) {/*noop*/} @@ -353,7 +355,9 @@ template<> struct extensions_t<1> : tuple { constexpr explicit extensions_t(base_ tup) : base_{tup} {} extensions_t() = default; - constexpr auto base() const -> base_ const& {return *this;} + + constexpr auto base() const& -> base_ const& { return *this; } + constexpr auto base() & -> base_ & { return *this; } BOOST_MULTI_HD constexpr auto operator==(extensions_t const& other) const -> bool {return base() == other.base();} // when compiling as cuda code, this needs --expt-relaxed-constexpr BOOST_MULTI_HD constexpr auto operator!=(extensions_t const& other) const -> bool {return base() != other.base();} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d019eb5d5..a3f38ed38 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,6 +24,7 @@ else() option(CMAKE_COMPILE_WARNING_AS_ERROR "Compile warnings as errors" ON) find_package(Boost CONFIG) + find_package(Boost COMPONENTS serialization) if(ENABLE_CUDA) enable_language(CUDA) @@ -383,7 +384,7 @@ else() add_test(NAME ${TEST_EXE} COMMAND $) endforeach() - target_link_libraries (${TEST_EXE} PRIVATE TBB::tbb) + # target_link_libraries (serialization.cpp.x PRIVATE Boost::serialization) endif() endif()