@@ -76,6 +76,28 @@ namespace container {
7676
7777#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
7878
79+ namespace dtl {
80+
81+ template <class Alloc , bool AllocV0 = (version<Alloc>::value == 0 )>
82+ struct is_version_0_alloc_and_trivially_destructible
83+ : boost::move_detail::is_trivially_destructible<typename Alloc::value_type>
84+ { };
85+
86+ template <bool AllocV0>
87+ struct is_version_0_alloc_and_trivially_destructible <void , AllocV0>
88+ {
89+ BOOST_STATIC_CONSTEXPR bool value = false ;
90+ };
91+
92+ template <class Alloc >
93+ struct is_version_0_alloc_and_trivially_destructible <Alloc, false >
94+ {
95+ BOOST_STATIC_CONSTEXPR bool value = false ;
96+ };
97+
98+
99+ } // namespace dtl {
100+
79101template <class SizeType , class LimitSizeType >
80102struct vec_on_type_overflow
81103{
@@ -1224,7 +1246,7 @@ class vector
12241246 // ! <b>Complexity</b>: Linear to the number of elements.
12251247 ~vector () BOOST_NOEXCEPT_OR_NOTHROW
12261248 #if defined(BOOST_INTRUSIVE_CONCEPTS_BASED_OVERLOADING)
1227- requires (dtl::version <allocator_type>::value != 0 || !::boost::move_detail::is_trivially_destructible<T >::value)
1249+ requires (! dtl::is_version_0_alloc_and_trivially_destructible <allocator_type>::value)
12281250 #endif
12291251 {
12301252 boost::container::destroy_alloc_n
@@ -1235,7 +1257,7 @@ class vector
12351257 #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) && defined(BOOST_INTRUSIVE_CONCEPTS_BASED_OVERLOADING)
12361258 // Default destructor for normal links (allows conditional triviality)
12371259 ~vector ()
1238- requires (dtl::version <allocator_type>::value == 0 && ::boost::move_detail::is_trivially_destructible<T >::value)
1260+ requires (dtl::is_version_0_alloc_and_trivially_destructible <allocator_type>::value)
12391261 = default ;
12401262 #endif
12411263
0 commit comments