diff --git a/include/boost/hana/traits.hpp b/include/boost/hana/traits.hpp index e1141b6b3..0ca543a63 100644 --- a/include/boost/hana/traits.hpp +++ b/include/boost/hana/traits.hpp @@ -165,6 +165,7 @@ namespace boost { namespace hana { namespace traits { BOOST_HANA_INLINE_VARIABLE constexpr auto remove_all_extents = metafunction; // Miscellaneous transformations +#if __cplusplus < 202302L BOOST_HANA_INLINE_VARIABLE constexpr struct aligned_storage_t { template constexpr auto operator()(Len const&, Align const&) const { @@ -190,6 +191,7 @@ namespace boost { namespace hana { namespace traits { return hana::type_c; } } aligned_union{}; +#endif BOOST_HANA_INLINE_VARIABLE constexpr auto decay = metafunction; // enable_if diff --git a/test/type/traits.cpp b/test/type/traits.cpp index b731988ce..eb6315f9d 100644 --- a/test/type/traits.cpp +++ b/test/type/traits.cpp @@ -141,9 +141,11 @@ int main() { hana::traits::remove_all_extents(s); // Miscellaneous transformations +#if __cplusplus < 202302L hana::traits::aligned_storage(hana::size_c<1>); hana::traits::aligned_storage(hana::size_c<1>, hana::size_c<1>); hana::traits::aligned_union(hana::size_c<0>, s); +#endif hana::traits::decay(s); hana::traits::common_type(s, s);