mirror of
https://github.com/boostorg/container.git
synced 2025-07-31 21:14:30 +02:00
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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user