Avoid rebinding the allocator o container if std::pair is movable (impl_pairt_ is the same type as std_pair_t)

This commit is contained in:
Ion Gaztañaga
2024-09-08 00:49:18 +02:00
parent 419b1e9f09
commit ceadad2e6e

View File

@@ -163,11 +163,14 @@ class flat_map
typedef dtl_pair_t impl_pair_t;
#endif
typedef dtl::flat_tree<
impl_pair_t,
typedef dtl::flat_tree< impl_pair_t,
dtl::select1st<Key>,
Compare,
#ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE
AllocatorOrContainer
#else
typename dtl::container_or_allocator_rebind<AllocatorOrContainer, impl_pair_t >::type
#endif
> impl_tree_t;
impl_tree_t m_flat_tree; // flat tree representing flat_map
@@ -1849,7 +1852,11 @@ class flat_multimap
impl_pair_t,
dtl::select1st<Key>,
Compare,
#ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE
AllocatorOrContainer
#else
typename dtl::container_or_allocator_rebind<AllocatorOrContainer, impl_pair_t >::type
#endif
> impl_tree_t;
impl_tree_t m_flat_tree; // flat tree representing flat_map