|
30 | 30 | #include <boost/container/detail/type_traits.hpp> |
31 | 31 | #include <boost/container/detail/mpl.hpp> |
32 | 32 | #include <boost/container/detail/algorithm.hpp> //equal() |
33 | | -#include <boost/container/detail/container_or_allocator_rebind.hpp> |
34 | 33 | #include <boost/container/detail/pair.hpp> |
35 | 34 | // move |
36 | 35 | #include <boost/move/utility_core.hpp> |
|
54 | 53 | #define BOOST_CONTAINER_STD_PAIR_IS_MOVABLE |
55 | 54 | #endif |
56 | 55 |
|
| 56 | +#ifndef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE |
| 57 | +#include <boost/container/detail/container_or_allocator_rebind.hpp> |
| 58 | +#endif |
| 59 | + |
57 | 60 | //for C++03 compilers, were type-puning is the only option for std::pair |
58 | 61 | //disable strict aliasing to reduce problems. |
59 | 62 | #if defined(BOOST_GCC) && (BOOST_GCC >= 100000) && !defined(BOOST_CONTAINER_STD_PAIR_IS_MOVABLE) |
@@ -1788,7 +1791,11 @@ template <class Key, class T, class Compare, class AllocatorOrContainer> |
1788 | 1791 | struct has_trivial_destructor_after_move<boost::container::flat_map<Key, T, Compare, AllocatorOrContainer> > |
1789 | 1792 | { |
1790 | 1793 | typedef typename boost::container::flat_map<Key, T, Compare, AllocatorOrContainer>::value_type value_t; |
| 1794 | + #ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE |
| 1795 | + typedef AllocatorOrContainer alloc_or_cont_t; |
| 1796 | + #else |
1791 | 1797 | typedef typename ::boost::container::dtl::container_or_allocator_rebind<AllocatorOrContainer, value_t>::type alloc_or_cont_t; |
| 1798 | + #endif |
1792 | 1799 | typedef ::boost::container::dtl::flat_tree<value_t,::boost::container::dtl::select1st<Key>, Compare, alloc_or_cont_t> tree; |
1793 | 1800 | BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value; |
1794 | 1801 | }; |
@@ -3143,7 +3150,11 @@ template <class Key, class T, class Compare, class AllocatorOrContainer> |
3143 | 3150 | struct has_trivial_destructor_after_move< boost::container::flat_multimap<Key, T, Compare, AllocatorOrContainer> > |
3144 | 3151 | { |
3145 | 3152 | typedef typename boost::container::flat_multimap<Key, T, Compare, AllocatorOrContainer>::value_type value_t; |
| 3153 | + #ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE |
| 3154 | + typedef AllocatorOrContainer alloc_or_cont_t; |
| 3155 | + #else |
3146 | 3156 | typedef typename ::boost::container::dtl::container_or_allocator_rebind<AllocatorOrContainer, value_t>::type alloc_or_cont_t; |
| 3157 | + #endif |
3147 | 3158 | typedef ::boost::container::dtl::flat_tree<value_t,::boost::container::dtl::select1st<Key>, Compare, alloc_or_cont_t> tree; |
3148 | 3159 | BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value; |
3149 | 3160 | }; |
|
0 commit comments