diff --git a/include/boost/unordered/detail/foa/core.hpp b/include/boost/unordered/detail/foa/core.hpp index e8fefe28..ddc71917 100644 --- a/include/boost/unordered/detail/foa/core.hpp +++ b/include/boost/unordered/detail/foa/core.hpp @@ -1042,10 +1042,7 @@ struct table_arrays initialize_groups( arrays.groups(),groups_size, - std::integral_constant< - bool, - is_trivially_default_constructible::value - >{}); + is_trivially_default_constructible{}); arrays.groups()[groups_size-1].set_sentinel(); } @@ -2060,10 +2057,7 @@ private: } void copy_groups_array_from(const table_core& x) { - copy_groups_array_from(x, std::integral_constant::value - >{} - ); + copy_groups_array_from(x,is_trivially_copy_assignable{}); } void copy_groups_array_from( diff --git a/include/boost/unordered/detail/type_traits.hpp b/include/boost/unordered/detail/type_traits.hpp index 70bead23..dc7ebafe 100644 --- a/include/boost/unordered/detail/type_traits.hpp +++ b/include/boost/unordered/detail/type_traits.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Christian Mazakas +// Copyright (C) 2022-2023 Christian Mazakas // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -50,11 +50,12 @@ namespace boost { #if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000) /* std::is_trivially_default_constructible not provided */ - template struct is_trivially_default_constructible + template + struct is_trivially_default_constructible + : public std::integral_constant::value && + std::has_trivial_default_constructor::value> { - constexpr static const bool value = - std::is_default_constructible::value && - std::has_trivial_default_constructor::value; }; #else using std::is_trivially_default_constructible; @@ -62,12 +63,12 @@ namespace boost { #if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000) /* std::is_trivially_copy_constructible not provided */ - template struct is_trivially_copy_constructible + template + struct is_trivially_copy_constructible + : public std::integral_constant::value && + std::has_trivial_copy_constructor::value> { - - constexpr static bool const value = - std::is_copy_constructible::value && - std::has_trivial_copy_constructor::value; }; #else using std::is_trivially_copy_constructible; @@ -75,11 +76,12 @@ namespace boost { #if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000) /* std::is_trivially_copy_assignable not provided */ - template struct is_trivially_copy_assignable + template + struct is_trivially_copy_assignable + : public std::integral_constant::value && + std::has_trivial_copy_assign::value> { - constexpr static bool const value = - std::is_copy_assignable::value && - std::has_trivial_copy_assign::value; }; #else using std::is_trivially_copy_assignable; @@ -103,10 +105,11 @@ namespace boost { } // namespace type_traits_detail - template struct is_nothrow_swappable + template + struct is_nothrow_swappable + : public std::integral_constant::value> { - constexpr static bool const value = - type_traits_detail::is_nothrow_swappable_helper::value; }; ////////////////////////////////////////////////////////////////////////////