forked from boostorg/container
Use namespace dtl instead of container_detail to avoid excessively long symbol names.
This commit is contained in:
1 parent
61d965f1a0
commit
fa2494631a
104 files changed
+1395
-1395
No files matched your search
+1
-1
@@ -27,7 +27,7 @@ rule test_all
|
||||
|
||||
for local fileb in [ glob *.cpp ]
|
||||
{
|
||||
all_rules += [ run $(fileb) /boost/container//boost_container /boost/timer//boost_timer
|
||||
all_rules += [ run $(fileb) /boost/container//boost_container
|
||||
: # additional args
|
||||
: # test-files
|
||||
: # requirements
|
||||
|
||||
@@ -27,10 +27,10 @@ class propagation_test_allocator
|
||||
typedef propagation_test_allocator<U, Id, HasTrueTypes> other;
|
||||
};
|
||||
|
||||
typedef boost::container::container_detail::bool_<HasTrueTypes> propagate_on_container_copy_assignment;
|
||||
typedef boost::container::container_detail::bool_<HasTrueTypes> propagate_on_container_move_assignment;
|
||||
typedef boost::container::container_detail::bool_<HasTrueTypes> propagate_on_container_swap;
|
||||
typedef boost::container::container_detail::bool_<HasTrueTypes> is_always_equal;
|
||||
typedef boost::container::dtl::bool_<HasTrueTypes> propagate_on_container_copy_assignment;
|
||||
typedef boost::container::dtl::bool_<HasTrueTypes> propagate_on_container_move_assignment;
|
||||
typedef boost::container::dtl::bool_<HasTrueTypes> propagate_on_container_swap;
|
||||
typedef boost::container::dtl::bool_<HasTrueTypes> is_always_equal;
|
||||
typedef T value_type;
|
||||
|
||||
propagation_test_allocator()
|
||||
|
||||
@@ -27,7 +27,7 @@ class SimpleAllocator
|
||||
bool allocate_called_;
|
||||
bool deallocate_called_;
|
||||
|
||||
typedef boost::container::container_detail::
|
||||
typedef boost::container::dtl::
|
||||
true_type is_always_equal;
|
||||
|
||||
typedef T value_type;
|
||||
@@ -106,20 +106,20 @@ class ComplexAllocator
|
||||
typedef SimpleSmartPtr<T> pointer;
|
||||
typedef SimpleSmartPtr<const T> const_pointer;
|
||||
typedef typename ::boost::container::
|
||||
container_detail::unvoid_ref<T>::type reference;
|
||||
dtl::unvoid_ref<T>::type reference;
|
||||
typedef typename ::boost::container::
|
||||
container_detail::unvoid_ref<const T>::type const_reference;
|
||||
dtl::unvoid_ref<const T>::type const_reference;
|
||||
typedef SimpleSmartPtr<void> void_pointer;
|
||||
typedef SimpleSmartPtr<const void> const_void_pointer;
|
||||
typedef signed short difference_type;
|
||||
typedef unsigned short size_type;
|
||||
typedef boost::container::container_detail::
|
||||
typedef boost::container::dtl::
|
||||
true_type propagate_on_container_copy_assignment;
|
||||
typedef boost::container::container_detail::
|
||||
typedef boost::container::dtl::
|
||||
true_type propagate_on_container_move_assignment;
|
||||
typedef boost::container::container_detail::
|
||||
typedef boost::container::dtl::
|
||||
true_type propagate_on_container_swap;
|
||||
typedef boost::container::container_detail::
|
||||
typedef boost::container::dtl::
|
||||
true_type is_partially_propagable;
|
||||
|
||||
ComplexAllocator()
|
||||
@@ -247,7 +247,7 @@ void test_void_allocator()
|
||||
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container::container_detail;
|
||||
using namespace boost::container::dtl;
|
||||
test_void_allocator();
|
||||
|
||||
//SimpleAllocator
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace test{
|
||||
|
||||
template< class T1, class T2>
|
||||
bool CheckEqual( const T1 &t1, const T2 &t2
|
||||
, typename boost::container::container_detail::enable_if_c
|
||||
<!boost::container::container_detail::is_pair<T1>::value &&
|
||||
!boost::container::container_detail::is_pair<T2>::value
|
||||
, typename boost::container::dtl::enable_if_c
|
||||
<!boost::container::dtl::is_pair<T1>::value &&
|
||||
!boost::container::dtl::is_pair<T2>::value
|
||||
>::type* = 0)
|
||||
{ return t1 == t2; }
|
||||
|
||||
@@ -50,9 +50,9 @@ bool CheckEqualIt( const T1 &i1, const T2 &i2, const C1 &c1, const C2 &c2 )
|
||||
|
||||
template< class Pair1, class Pair2>
|
||||
bool CheckEqual( const Pair1 &pair1, const Pair2 &pair2
|
||||
, typename boost::container::container_detail::enable_if_c
|
||||
<boost::container::container_detail::is_pair<Pair1>::value &&
|
||||
boost::container::container_detail::is_pair<Pair2>::value
|
||||
, typename boost::container::dtl::enable_if_c
|
||||
<boost::container::dtl::is_pair<Pair1>::value &&
|
||||
boost::container::dtl::is_pair<Pair2>::value
|
||||
>::type* = 0)
|
||||
{
|
||||
return CheckEqual(pair1.first, pair2.first) && CheckEqual(pair1.second, pair2.second);
|
||||
|
||||
+3
-3
@@ -51,14 +51,14 @@ template class boost::container::deque
|
||||
|
||||
//Function to check if both sets are equal
|
||||
template<class V1, class V2>
|
||||
bool deque_copyable_only(V1 &, V2 &, container_detail::false_type)
|
||||
bool deque_copyable_only(V1 &, V2 &, dtl::false_type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//Function to check if both sets are equal
|
||||
template<class V1, class V2>
|
||||
bool deque_copyable_only(V1 &cntdeque, V2 &stddeque, container_detail::true_type)
|
||||
bool deque_copyable_only(V1 &cntdeque, V2 &stddeque, dtl::true_type)
|
||||
{
|
||||
typedef typename V1::value_type IntType;
|
||||
std::size_t size = cntdeque.size();
|
||||
@@ -246,7 +246,7 @@ bool do_test()
|
||||
}
|
||||
|
||||
if(!deque_copyable_only(cntdeque, stddeque
|
||||
,container_detail::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
,dtl::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,11 +85,11 @@ class propagation_test_allocator
|
||||
|
||||
public:
|
||||
typedef T value_type;
|
||||
typedef boost::container::container_detail::bool_<PropagateOnContCopyAssign>
|
||||
typedef boost::container::dtl::bool_<PropagateOnContCopyAssign>
|
||||
propagate_on_container_copy_assignment;
|
||||
typedef boost::container::container_detail::bool_<PropagateOnContMoveAssign>
|
||||
typedef boost::container::dtl::bool_<PropagateOnContMoveAssign>
|
||||
propagate_on_container_move_assignment;
|
||||
typedef boost::container::container_detail::bool_<PropagateOnContSwap>
|
||||
typedef boost::container::dtl::bool_<PropagateOnContSwap>
|
||||
propagate_on_container_swap;
|
||||
|
||||
template<class T2>
|
||||
|
||||
+18
-18
@@ -144,7 +144,7 @@ bool test_expected_container(const Container &ec, const std::pair<EmplaceInt, Em
|
||||
}
|
||||
|
||||
typedef std::pair<EmplaceInt, EmplaceInt> EmplaceIntPair;
|
||||
static boost::container::container_detail::aligned_storage<sizeof(EmplaceIntPair)*10>::type pair_storage;
|
||||
static boost::container::dtl::aligned_storage<sizeof(EmplaceIntPair)*10>::type pair_storage;
|
||||
|
||||
static EmplaceIntPair* initialize_emplace_int_pair()
|
||||
{
|
||||
@@ -160,7 +160,7 @@ static EmplaceIntPair * expected_pair = initialize_emplace_int_pair();
|
||||
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_back(container_detail::true_)
|
||||
bool test_emplace_back(dtl::true_)
|
||||
{
|
||||
std::cout << "Starting test_emplace_back." << std::endl << " Class: "
|
||||
<< typeid(Container).name() << std::endl;
|
||||
@@ -209,11 +209,11 @@ bool test_emplace_back(container_detail::true_)
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_back(container_detail::false_)
|
||||
bool test_emplace_back(dtl::false_)
|
||||
{ return true; }
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_front(container_detail::true_)
|
||||
bool test_emplace_front(dtl::true_)
|
||||
{
|
||||
std::cout << "Starting test_emplace_front." << std::endl << " Class: "
|
||||
<< typeid(Container).name() << std::endl;
|
||||
@@ -261,11 +261,11 @@ bool test_emplace_front(container_detail::true_)
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_front(container_detail::false_)
|
||||
bool test_emplace_front(dtl::false_)
|
||||
{ return true; }
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_before(container_detail::true_)
|
||||
bool test_emplace_before(dtl::true_)
|
||||
{
|
||||
std::cout << "Starting test_emplace_before." << std::endl << " Class: "
|
||||
<< typeid(Container).name() << std::endl;
|
||||
@@ -373,11 +373,11 @@ bool test_emplace_before(container_detail::true_)
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_before(container_detail::false_)
|
||||
bool test_emplace_before(dtl::false_)
|
||||
{ return true; }
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_after(container_detail::true_)
|
||||
bool test_emplace_after(dtl::true_)
|
||||
{
|
||||
std::cout << "Starting test_emplace_after." << std::endl << " Class: "
|
||||
<< typeid(Container).name() << std::endl;
|
||||
@@ -459,11 +459,11 @@ bool test_emplace_after(container_detail::true_)
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_after(container_detail::false_)
|
||||
bool test_emplace_after(dtl::false_)
|
||||
{ return true; }
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_assoc(container_detail::true_)
|
||||
bool test_emplace_assoc(dtl::true_)
|
||||
{
|
||||
std::cout << "Starting test_emplace_assoc." << std::endl << " Class: "
|
||||
<< typeid(Container).name() << std::endl;
|
||||
@@ -506,11 +506,11 @@ bool test_emplace_assoc(container_detail::true_)
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_assoc(container_detail::false_)
|
||||
bool test_emplace_assoc(dtl::false_)
|
||||
{ return true; }
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_hint(container_detail::true_)
|
||||
bool test_emplace_hint(dtl::true_)
|
||||
{
|
||||
std::cout << "Starting test_emplace_hint." << std::endl << " Class: "
|
||||
<< typeid(Container).name() << std::endl;
|
||||
@@ -556,11 +556,11 @@ bool test_emplace_hint(container_detail::true_)
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_hint(container_detail::false_)
|
||||
bool test_emplace_hint(dtl::false_)
|
||||
{ return true; }
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_assoc_pair(container_detail::true_)
|
||||
bool test_emplace_assoc_pair(dtl::true_)
|
||||
{
|
||||
std::cout << "Starting test_emplace_assoc_pair." << std::endl << " Class: "
|
||||
<< typeid(Container).name() << std::endl;
|
||||
@@ -594,11 +594,11 @@ bool test_emplace_assoc_pair(container_detail::true_)
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_assoc_pair(container_detail::false_)
|
||||
bool test_emplace_assoc_pair(dtl::false_)
|
||||
{ return true; }
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_hint_pair(container_detail::true_)
|
||||
bool test_emplace_hint_pair(dtl::true_)
|
||||
{
|
||||
std::cout << "Starting test_emplace_hint_pair." << std::endl << " Class: "
|
||||
<< typeid(Container).name() << std::endl;
|
||||
@@ -633,14 +633,14 @@ bool test_emplace_hint_pair(container_detail::true_)
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
bool test_emplace_hint_pair(container_detail::false_)
|
||||
bool test_emplace_hint_pair(dtl::false_)
|
||||
{ return true; }
|
||||
|
||||
template <EmplaceOptions O, EmplaceOptions Mask>
|
||||
struct emplace_active
|
||||
{
|
||||
static const bool value = (0 != (O & Mask));
|
||||
typedef container_detail::bool_<value> type;
|
||||
typedef dtl::bool_<value> type;
|
||||
operator type() const{ return type(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -62,14 +62,14 @@ class expand_bwd_test_allocator
|
||||
typedef T value_type;
|
||||
typedef T * pointer;
|
||||
typedef const T * const_pointer;
|
||||
typedef typename container_detail::add_reference
|
||||
typedef typename dtl::add_reference
|
||||
<value_type>::type reference;
|
||||
typedef typename container_detail::add_reference
|
||||
typedef typename dtl::add_reference
|
||||
<const value_type>::type const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
typedef boost::container::container_detail::version_type<expand_bwd_test_allocator, 2> version;
|
||||
typedef boost::container::dtl::version_type<expand_bwd_test_allocator, 2> version;
|
||||
|
||||
//Dummy multiallocation chain
|
||||
struct multiallocation_chain{};
|
||||
@@ -95,10 +95,10 @@ class expand_bwd_test_allocator
|
||||
, m_offset(other.m_offset), m_allocations(0){ }
|
||||
|
||||
pointer address(reference value)
|
||||
{ return pointer(container_detail::addressof(value)); }
|
||||
{ return pointer(dtl::addressof(value)); }
|
||||
|
||||
const_pointer address(const_reference value) const
|
||||
{ return const_pointer(container_detail::addressof(value)); }
|
||||
{ return const_pointer(dtl::addressof(value)); }
|
||||
|
||||
pointer allocate(size_type , cvoid_ptr hint = 0)
|
||||
{ (void)hint; return 0; }
|
||||
|
||||
@@ -370,13 +370,13 @@ struct GetMapContainer
|
||||
typedef flat_map< ValueType
|
||||
, ValueType
|
||||
, std::less<ValueType>
|
||||
, typename boost::container::container_detail::container_or_allocator_rebind<VoidAllocatorOrContainer, type_t>::type
|
||||
, typename boost::container::dtl::container_or_allocator_rebind<VoidAllocatorOrContainer, type_t>::type
|
||||
> map_type;
|
||||
|
||||
typedef flat_multimap< ValueType
|
||||
, ValueType
|
||||
, std::less<ValueType>
|
||||
, typename boost::container::container_detail::container_or_allocator_rebind<VoidAllocatorOrContainer, type_t>::type
|
||||
, typename boost::container::dtl::container_or_allocator_rebind<VoidAllocatorOrContainer, type_t>::type
|
||||
> multimap_type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -441,12 +441,12 @@ struct GetSetContainer
|
||||
{
|
||||
typedef flat_set < ValueType
|
||||
, std::less<ValueType>
|
||||
, typename boost::container::container_detail::container_or_allocator_rebind<VoidAllocatorOrContainer, ValueType>::type
|
||||
, typename boost::container::dtl::container_or_allocator_rebind<VoidAllocatorOrContainer, ValueType>::type
|
||||
> set_type;
|
||||
|
||||
typedef flat_multiset < ValueType
|
||||
, std::less<ValueType>
|
||||
, typename boost::container::container_detail::container_or_allocator_rebind<VoidAllocatorOrContainer, ValueType>::type
|
||||
, typename boost::container::dtl::container_or_allocator_rebind<VoidAllocatorOrContainer, ValueType>::type
|
||||
> multiset_type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
|
||||
using namespace boost::container;
|
||||
|
||||
typedef boost::container::container_detail::pair<test::movable_and_copyable_int, test::movable_and_copyable_int> pair_t;
|
||||
typedef boost::container::dtl::pair<test::movable_and_copyable_int, test::movable_and_copyable_int> pair_t;
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
|
||||
//Explicit instantiation to detect compilation errors
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template class flat_tree
|
||||
< pair_t
|
||||
@@ -89,7 +89,7 @@ template class flat_tree
|
||||
, static_vector<test::movable_and_copyable_int, 10>
|
||||
>;
|
||||
|
||||
} //container_detail {
|
||||
} //dtl {
|
||||
}} //boost::container
|
||||
|
||||
#if (__cplusplus > 201103L)
|
||||
@@ -97,7 +97,7 @@ template class flat_tree
|
||||
|
||||
namespace boost{
|
||||
namespace container{
|
||||
namespace container_detail{
|
||||
namespace dtl{
|
||||
|
||||
template class flat_tree
|
||||
< test::movable_and_copyable_int
|
||||
@@ -113,7 +113,7 @@ template class flat_tree
|
||||
, std::vector<pair_t>
|
||||
>;
|
||||
|
||||
} //container_detail {
|
||||
} //dtl {
|
||||
}} //boost::container
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ template class boost::container::list
|
||||
< test::movable_and_copyable_int
|
||||
, adaptive_pool<test::movable_and_copyable_int> >;
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template class iterator_from_iiterator
|
||||
<intrusive_list_type< std::allocator<int> >::container_type::iterator, true >;
|
||||
|
||||
+3
-3
@@ -28,14 +28,14 @@ namespace container {
|
||||
namespace test{
|
||||
|
||||
template<class V1, class V2>
|
||||
bool list_copyable_only(V1 &, V2 &, boost::container::container_detail::false_type)
|
||||
bool list_copyable_only(V1 &, V2 &, boost::container::dtl::false_type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//Function to check if both sets are equal
|
||||
template<class V1, class V2>
|
||||
bool list_copyable_only(V1 &boostlist, V2 &stdlist, boost::container::container_detail::true_type)
|
||||
bool list_copyable_only(V1 &boostlist, V2 &stdlist, boost::container::dtl::true_type)
|
||||
{
|
||||
typedef typename V1::value_type IntType;
|
||||
boostlist.insert(boostlist.end(), 50, IntType(1));
|
||||
@@ -403,7 +403,7 @@ int list_test (bool copied_allocators_equal = true)
|
||||
}
|
||||
|
||||
if(!list_copyable_only(boostlist, stdlist
|
||||
,container_detail::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
,dtl::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-9
@@ -42,11 +42,11 @@ namespace container {
|
||||
namespace test{
|
||||
|
||||
template<class C>
|
||||
void map_test_rebalanceable(C &, boost::container::container_detail::false_type)
|
||||
void map_test_rebalanceable(C &, boost::container::dtl::false_type)
|
||||
{}
|
||||
|
||||
template<class C>
|
||||
void map_test_rebalanceable(C &c, boost::container::container_detail::true_type)
|
||||
void map_test_rebalanceable(C &c, boost::container::dtl::true_type)
|
||||
{
|
||||
c.rebalance();
|
||||
}
|
||||
@@ -55,17 +55,17 @@ template<class MyBoostMap
|
||||
,class MyStdMap
|
||||
,class MyBoostMultiMap
|
||||
,class MyStdMultiMap>
|
||||
int map_test_copyable(boost::container::container_detail::false_type)
|
||||
int map_test_copyable(boost::container::dtl::false_type)
|
||||
{ return 0; }
|
||||
|
||||
template<class MyBoostMap
|
||||
,class MyStdMap
|
||||
,class MyBoostMultiMap
|
||||
,class MyStdMultiMap>
|
||||
int map_test_copyable(boost::container::container_detail::true_type)
|
||||
int map_test_copyable(boost::container::dtl::true_type)
|
||||
{
|
||||
typedef typename MyBoostMap::key_type IntType;
|
||||
typedef container_detail::pair<IntType, IntType> IntPairType;
|
||||
typedef dtl::pair<IntType, IntType> IntPairType;
|
||||
typedef typename MyStdMap::value_type StdPairType;
|
||||
|
||||
const int MaxElem = 50;
|
||||
@@ -136,7 +136,7 @@ template<class MyBoostMap
|
||||
int map_test()
|
||||
{
|
||||
typedef typename MyBoostMap::key_type IntType;
|
||||
typedef container_detail::pair<IntType, IntType> IntPairType;
|
||||
typedef dtl::pair<IntType, IntType> IntPairType;
|
||||
typedef typename MyStdMap::value_type StdPairType;
|
||||
const int MaxElem = 50;
|
||||
typedef typename MyStdMap::value_type StdValueType;
|
||||
@@ -615,13 +615,13 @@ int map_test()
|
||||
return 1;
|
||||
|
||||
map_test_rebalanceable(boostmap
|
||||
, container_detail::bool_<has_member_rebalance<MyBoostMap>::value>());
|
||||
, dtl::bool_<has_member_rebalance<MyBoostMap>::value>());
|
||||
if(!CheckEqualContainers(boostmap, stdmap)){
|
||||
std::cout << "Error in boostmap.rebalance()" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
map_test_rebalanceable(boostmultimap
|
||||
, container_detail::bool_<has_member_rebalance<MyBoostMap>::value>());
|
||||
, dtl::bool_<has_member_rebalance<MyBoostMap>::value>());
|
||||
if(!CheckEqualContainers(boostmultimap, stdmultimap)){
|
||||
std::cout << "Error in boostmultimap.rebalance()" << std::endl;
|
||||
return 1;
|
||||
@@ -898,7 +898,7 @@ int map_test()
|
||||
}
|
||||
|
||||
if(map_test_copyable<MyBoostMap, MyStdMap, MyBoostMultiMap, MyStdMultiMap>
|
||||
(container_detail::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
(dtl::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -174,16 +174,16 @@ typedef allocator_traits<node_alloc_t>::portable_rebind_alloc<test_pair>::type v
|
||||
void test_types()
|
||||
{
|
||||
//set
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<node_handle_set_t::value_type, test_pair>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<node_handle_set_t::key_type, test_pair>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<node_handle_set_t::mapped_type, test_pair>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<node_handle_set_t::allocator_type, value_allocator_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::value_type, test_pair>::value ));
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::key_type, test_pair>::value ));
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::mapped_type, test_pair>::value ));
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::allocator_type, value_allocator_type>::value ));
|
||||
|
||||
//map
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<node_handle_map_t::value_type, test_pair>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<node_handle_map_t::key_type, int>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<node_handle_map_t::mapped_type, unsigned>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<node_handle_map_t::allocator_type, value_allocator_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::value_type, test_pair>::value ));
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::key_type, int>::value ));
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::mapped_type, unsigned>::value ));
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::allocator_type, value_allocator_type>::value ));
|
||||
}
|
||||
|
||||
void test_default_constructor()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
using namespace boost::container;
|
||||
|
||||
typedef boost::container::container_detail::aligned_storage<sizeof(void*)*4>::type buffer_t;
|
||||
typedef boost::container::dtl::aligned_storage<sizeof(void*)*4>::type buffer_t;
|
||||
|
||||
static buffer_t buffer_0x00;
|
||||
static buffer_t buffer_0xFF;
|
||||
|
||||
+29
-29
@@ -36,50 +36,50 @@ using namespace ::boost::container;
|
||||
int main ()
|
||||
{
|
||||
{
|
||||
container_detail::pair<test::non_copymovable_int, test::non_copymovable_int> p1;
|
||||
container_detail::pair<test::copyable_int, test::copyable_int> p2;
|
||||
container_detail::pair<test::movable_int, test::movable_int> p3;
|
||||
container_detail::pair<test::movable_and_copyable_int, test::movable_and_copyable_int> p4;
|
||||
dtl::pair<test::non_copymovable_int, test::non_copymovable_int> p1;
|
||||
dtl::pair<test::copyable_int, test::copyable_int> p2;
|
||||
dtl::pair<test::movable_int, test::movable_int> p3;
|
||||
dtl::pair<test::movable_and_copyable_int, test::movable_and_copyable_int> p4;
|
||||
}
|
||||
{ //Constructible from two values
|
||||
container_detail::pair<test::non_copymovable_int, test::non_copymovable_int> p1(1, 2);
|
||||
container_detail::pair<test::copyable_int, test::copyable_int> p2(1, 2);
|
||||
container_detail::pair<test::movable_int, test::movable_int> p3(1, 2);
|
||||
container_detail::pair<test::movable_and_copyable_int, test::movable_and_copyable_int> p4(1, 2);
|
||||
dtl::pair<test::non_copymovable_int, test::non_copymovable_int> p1(1, 2);
|
||||
dtl::pair<test::copyable_int, test::copyable_int> p2(1, 2);
|
||||
dtl::pair<test::movable_int, test::movable_int> p3(1, 2);
|
||||
dtl::pair<test::movable_and_copyable_int, test::movable_and_copyable_int> p4(1, 2);
|
||||
}
|
||||
|
||||
{ //Constructible from internal types
|
||||
container_detail::pair<test::copyable_int, test::copyable_int> p2(test::copyable_int(1), test::copyable_int(2));
|
||||
dtl::pair<test::copyable_int, test::copyable_int> p2(test::copyable_int(1), test::copyable_int(2));
|
||||
{
|
||||
test::movable_int a(1), b(2);
|
||||
container_detail::pair<test::movable_int, test::movable_int> p3(::boost::move(a), ::boost::move(b));
|
||||
dtl::pair<test::movable_int, test::movable_int> p3(::boost::move(a), ::boost::move(b));
|
||||
}
|
||||
{
|
||||
test::movable_and_copyable_int a(1), b(2);
|
||||
container_detail::pair<test::movable_and_copyable_int, test::movable_and_copyable_int> p4(::boost::move(a), ::boost::move(b));
|
||||
dtl::pair<test::movable_and_copyable_int, test::movable_and_copyable_int> p4(::boost::move(a), ::boost::move(b));
|
||||
}
|
||||
}
|
||||
{ //piecewise construct from boost tuple
|
||||
using namespace boost::tuples;
|
||||
{
|
||||
boost::container::container_detail::pair<int, float> p(piecewise_construct, tuple<>(), tuple<>());
|
||||
boost::container::dtl::pair<int, float> p(piecewise_construct, tuple<>(), tuple<>());
|
||||
BOOST_TEST(p.first == 0);
|
||||
BOOST_TEST(p.second == 0.f);
|
||||
}
|
||||
{
|
||||
boost::container::container_detail::pair<int, float> p(piecewise_construct, tuple<>(), tuple<float>(2.f));
|
||||
boost::container::dtl::pair<int, float> p(piecewise_construct, tuple<>(), tuple<float>(2.f));
|
||||
BOOST_TEST(p.first == 0);
|
||||
BOOST_TEST(p.second == 2.f);
|
||||
}
|
||||
{
|
||||
boost::container::container_detail::pair<int, float> p(piecewise_construct, tuple<int>(2), tuple<float>(1.f));
|
||||
boost::container::dtl::pair<int, float> p(piecewise_construct, tuple<int>(2), tuple<float>(1.f));
|
||||
BOOST_TEST(p.first == 2);
|
||||
BOOST_TEST(p.second == 1.f);
|
||||
}
|
||||
{
|
||||
boost::container::container_detail::pair
|
||||
< boost::container::container_detail::pair<int, float>
|
||||
, boost::container::container_detail::pair<double, char>
|
||||
boost::container::dtl::pair
|
||||
< boost::container::dtl::pair<int, float>
|
||||
, boost::container::dtl::pair<double, char>
|
||||
> p(piecewise_construct, tuple<int, float>(3, 4.f), tuple<double, char>(8.,'a'));
|
||||
BOOST_TEST(p.first.first == 3);
|
||||
BOOST_TEST(p.first.second == 4.f);
|
||||
@@ -87,7 +87,7 @@ int main ()
|
||||
BOOST_TEST(p.second.second == 'a');
|
||||
}
|
||||
{
|
||||
boost::container::container_detail::pair
|
||||
boost::container::dtl::pair
|
||||
< tuple<int, float, double>
|
||||
, char
|
||||
> p(piecewise_construct, tuple<int, float, double>(3, 16.f, 32.), tuple<char>('b'));
|
||||
@@ -101,24 +101,24 @@ int main ()
|
||||
{ //piecewise construct from std tuple
|
||||
using std::tuple;
|
||||
{
|
||||
boost::container::container_detail::pair<int, float> p(piecewise_construct, tuple<>(), tuple<>());
|
||||
boost::container::dtl::pair<int, float> p(piecewise_construct, tuple<>(), tuple<>());
|
||||
BOOST_TEST(p.first == 0);
|
||||
BOOST_TEST(p.second == 0.f);
|
||||
}
|
||||
{
|
||||
boost::container::container_detail::pair<int, float> p(piecewise_construct, tuple<>(), tuple<float>(2.f));
|
||||
boost::container::dtl::pair<int, float> p(piecewise_construct, tuple<>(), tuple<float>(2.f));
|
||||
BOOST_TEST(p.first == 0);
|
||||
BOOST_TEST(p.second == 2.f);
|
||||
}
|
||||
{
|
||||
boost::container::container_detail::pair<int, float> p(piecewise_construct, tuple<int>(2), tuple<float>(1.f));
|
||||
boost::container::dtl::pair<int, float> p(piecewise_construct, tuple<int>(2), tuple<float>(1.f));
|
||||
BOOST_TEST(p.first == 2);
|
||||
BOOST_TEST(p.second == 1.f);
|
||||
}
|
||||
{
|
||||
boost::container::container_detail::pair
|
||||
< boost::container::container_detail::pair<int, float>
|
||||
, boost::container::container_detail::pair<double, char>
|
||||
boost::container::dtl::pair
|
||||
< boost::container::dtl::pair<int, float>
|
||||
, boost::container::dtl::pair<double, char>
|
||||
> p(piecewise_construct, tuple<int, float>(3, 4.f), tuple<double, char>(8.,'a'));
|
||||
BOOST_TEST(p.first.first == 3);
|
||||
BOOST_TEST(p.first.second == 4.f);
|
||||
@@ -126,7 +126,7 @@ int main ()
|
||||
BOOST_TEST(p.second.second == 'a');
|
||||
}
|
||||
{
|
||||
boost::container::container_detail::pair
|
||||
boost::container::dtl::pair
|
||||
< tuple<int, float, double>
|
||||
, char
|
||||
> p(piecewise_construct, tuple<int, float, double>(3, 16.f, 32.), tuple<char>('b'));
|
||||
@@ -136,12 +136,12 @@ int main ()
|
||||
BOOST_TEST(p.second == 'b');
|
||||
}
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
typedef container_detail::pair<test::movable_int, test::movable_int> movable_pair_t;
|
||||
typedef container_detail::pair<movable_pair_t, movable_pair_t> movable_pair_pair_t;
|
||||
typedef dtl::pair<test::movable_int, test::movable_int> movable_pair_t;
|
||||
typedef dtl::pair<movable_pair_t, movable_pair_t> movable_pair_pair_t;
|
||||
test::movable_int a(1), b(2), c(3), d(4);
|
||||
movable_pair_pair_t p( piecewise_construct
|
||||
, container_detail::forward_as_tuple(boost::move(a), boost::move(b))
|
||||
, container_detail::forward_as_tuple(boost::move(c), boost::move(d))
|
||||
, dtl::forward_as_tuple(boost::move(a), boost::move(b))
|
||||
, dtl::forward_as_tuple(boost::move(c), boost::move(d))
|
||||
);
|
||||
BOOST_TEST(p.first.first == 1);
|
||||
BOOST_TEST(p.first.second == 2);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef deque<int, pmr::polymorphic_allocator<int> > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::deque_of<int>::type >::value ));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef flat_map<int, float, std::less<int>, pmr::polymorphic_allocator<std::pair<int, float> > > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_map_of<int, float>::type >::value ));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef flat_set<int, std::less<int>, pmr::polymorphic_allocator<int> > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_set_of<int>::type >::value ));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef list<int, pmr::polymorphic_allocator<int> > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::list_of<int>::type >::value ));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef map<int, float, std::less<int>, pmr::polymorphic_allocator<std::pair<const int, float> > > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::map_of<int, float>::type >::value ));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef set<int, std::less<int>, pmr::polymorphic_allocator<int> > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::set_of<int>::type >::value ));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef small_vector<int, 2, pmr::polymorphic_allocator<int> > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::small_vector_of<int, 2>::type >::value ));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef stable_vector<int, pmr::polymorphic_allocator<int> > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::stable_vector_of<int>::type >::value ));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef basic_string<char, std::char_traits<char>, pmr::polymorphic_allocator<char> > string_t;
|
||||
typedef basic_string<wchar_t, std::char_traits<wchar_t>, pmr::polymorphic_allocator<wchar_t> > wstring_t;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
int main()
|
||||
{
|
||||
using namespace boost::container;
|
||||
using boost::container::container_detail::is_same;
|
||||
using boost::container::dtl::is_same;
|
||||
|
||||
typedef vector<int, pmr::polymorphic_allocator<int> > intcontainer_t;
|
||||
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::vector_of<int>::type >::value ));
|
||||
|
||||
@@ -63,7 +63,7 @@ void test_allocate()
|
||||
BOOST_TEST(d.do_allocate_return == &dummy);
|
||||
//It shall allocate 2*sizeof(int), alignment_of<int>
|
||||
BOOST_TEST(d.do_allocate_bytes == 2*sizeof(int));
|
||||
BOOST_TEST(d.do_allocate_alignment == container_detail::alignment_of<int>::value);
|
||||
BOOST_TEST(d.do_allocate_alignment == dtl::alignment_of<int>::value);
|
||||
}
|
||||
|
||||
void test_deallocate()
|
||||
@@ -77,7 +77,7 @@ void test_deallocate()
|
||||
//It shall deallocate 2*sizeof(int), alignment_of<int>
|
||||
BOOST_TEST(d.do_deallocate_p == &dummy);
|
||||
BOOST_TEST(d.do_deallocate_bytes == 3*sizeof(int));
|
||||
BOOST_TEST(d.do_deallocate_alignment == container_detail::alignment_of<int>::value);
|
||||
BOOST_TEST(d.do_deallocate_alignment == dtl::alignment_of<int>::value);
|
||||
}
|
||||
|
||||
void test_construct()
|
||||
|
||||
@@ -29,10 +29,10 @@ class propagation_test_allocator
|
||||
typedef propagation_test_allocator<U, Id, HasTrueTypes> other;
|
||||
};
|
||||
|
||||
typedef boost::container::container_detail::bool_<HasTrueTypes> propagate_on_container_copy_assignment;
|
||||
typedef boost::container::container_detail::bool_<HasTrueTypes> propagate_on_container_move_assignment;
|
||||
typedef boost::container::container_detail::bool_<HasTrueTypes> propagate_on_container_swap;
|
||||
typedef boost::container::container_detail::bool_<HasTrueTypes> is_always_equal;
|
||||
typedef boost::container::dtl::bool_<HasTrueTypes> propagate_on_container_copy_assignment;
|
||||
typedef boost::container::dtl::bool_<HasTrueTypes> propagate_on_container_move_assignment;
|
||||
typedef boost::container::dtl::bool_<HasTrueTypes> propagate_on_container_swap;
|
||||
typedef boost::container::dtl::bool_<HasTrueTypes> is_always_equal;
|
||||
typedef T value_type;
|
||||
|
||||
propagation_test_allocator()
|
||||
|
||||
@@ -98,81 +98,81 @@ int main()
|
||||
, InnerAlloc2 > Rebound9Scoped2Inner;
|
||||
|
||||
//outer_allocator_type
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< OuterAlloc
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< OuterAlloc
|
||||
, Scoped0Inner::outer_allocator_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< OuterAlloc
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< OuterAlloc
|
||||
, Scoped1Inner::outer_allocator_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< OuterAlloc
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< OuterAlloc
|
||||
, Scoped2Inner::outer_allocator_type>::value ));
|
||||
//value_type
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::value_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::value_type
|
||||
, Scoped0Inner::value_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::value_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::value_type
|
||||
, Scoped1Inner::value_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::value_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::value_type
|
||||
, Scoped2Inner::value_type>::value ));
|
||||
//size_type
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::size_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
|
||||
, Scoped0Inner::size_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::size_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
|
||||
, Scoped1Inner::size_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::size_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
|
||||
, Scoped2Inner::size_type>::value ));
|
||||
|
||||
//difference_type
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::difference_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
|
||||
, Scoped0Inner::difference_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::difference_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
|
||||
, Scoped1Inner::difference_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::difference_type
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
|
||||
, Scoped2Inner::difference_type>::value ));
|
||||
|
||||
//pointer
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
|
||||
, Scoped0Inner::pointer>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
|
||||
, Scoped1Inner::pointer>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
|
||||
, Scoped2Inner::pointer>::value ));
|
||||
|
||||
//const_pointer
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::const_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
|
||||
, Scoped0Inner::const_pointer>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::const_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
|
||||
, Scoped1Inner::const_pointer>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::const_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
|
||||
, Scoped2Inner::const_pointer>::value ));
|
||||
|
||||
//void_pointer
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::void_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
|
||||
, Scoped0Inner::void_pointer>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::void_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
|
||||
, Scoped1Inner::void_pointer>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::void_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
|
||||
, Scoped2Inner::void_pointer>::value ));
|
||||
|
||||
//const_void_pointer
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::const_void_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
|
||||
, Scoped0Inner::const_void_pointer>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::const_void_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
|
||||
, Scoped1Inner::const_void_pointer>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< allocator_traits<OuterAlloc>::const_void_pointer
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
|
||||
, Scoped2Inner::const_void_pointer>::value ));
|
||||
|
||||
//rebind
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<Scoped0Inner::rebind< tagged_integer<9> >::other
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<Scoped0Inner::rebind< tagged_integer<9> >::other
|
||||
, Rebound9Scoped0Inner >::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<Scoped1Inner::rebind< tagged_integer<9> >::other
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<Scoped1Inner::rebind< tagged_integer<9> >::other
|
||||
, Rebound9Scoped1Inner >::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same<Scoped2Inner::rebind< tagged_integer<9> >::other
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same<Scoped2Inner::rebind< tagged_integer<9> >::other
|
||||
, Rebound9Scoped2Inner >::value ));
|
||||
|
||||
//inner_allocator_type
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< Scoped0Inner
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< Scoped0Inner
|
||||
, Scoped0Inner::inner_allocator_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< scoped_allocator_adaptor<InnerAlloc1>
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor<InnerAlloc1>
|
||||
, Scoped1Inner::inner_allocator_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same< scoped_allocator_adaptor<InnerAlloc1, InnerAlloc2>
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor<InnerAlloc1, InnerAlloc2>
|
||||
, Scoped2Inner::inner_allocator_type>::value ));
|
||||
|
||||
{
|
||||
@@ -685,15 +685,15 @@ int main()
|
||||
//Check outer_allocator_type is scoped
|
||||
BOOST_STATIC_ASSERT(( is_scoped_allocator
|
||||
<ScopedScoped0Inner::outer_allocator_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same
|
||||
< outermost_allocator<ScopedScoped0Inner>::type
|
||||
, Outer10IdAlloc
|
||||
>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same
|
||||
< ScopedScoped0Inner::outer_allocator_type
|
||||
, scoped_allocator_adaptor<Outer10IdAlloc>
|
||||
>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same
|
||||
< scoped_allocator_adaptor<Outer10IdAlloc>::outer_allocator_type
|
||||
, Outer10IdAlloc
|
||||
>::value ));
|
||||
@@ -768,15 +768,15 @@ int main()
|
||||
//Check outer_allocator_type is scoped
|
||||
BOOST_STATIC_ASSERT(( is_scoped_allocator
|
||||
<ScopedScoped1Inner::outer_allocator_type>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same
|
||||
< outermost_allocator<ScopedScoped1Inner>::type
|
||||
, Outer10IdAlloc
|
||||
>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same
|
||||
< ScopedScoped1Inner::outer_allocator_type
|
||||
, scoped_allocator_adaptor<Outer10IdAlloc, Inner11IdAlloc1>
|
||||
>::value ));
|
||||
BOOST_STATIC_ASSERT(( container_detail::is_same
|
||||
BOOST_STATIC_ASSERT(( dtl::is_same
|
||||
< scoped_allocator_adaptor<Outer10IdAlloc, Inner11IdAlloc1>::outer_allocator_type
|
||||
, Outer10IdAlloc
|
||||
>::value ));
|
||||
@@ -856,7 +856,7 @@ int main()
|
||||
//used to construct types.
|
||||
////////////////////////////////////////////////////////////
|
||||
{
|
||||
using container_detail::pair;
|
||||
using dtl::pair;
|
||||
typedef propagation_test_allocator< pair< tagged_integer<0>
|
||||
, tagged_integer<0> >, 0> OuterPairAlloc;
|
||||
//
|
||||
|
||||
@@ -341,7 +341,7 @@ bool test_value_and_state_equals(const alloc_int &r, int value, int state)
|
||||
{ return r.get_value() == value && r.get_allocator_state() == state; }
|
||||
|
||||
template<class F, class S>
|
||||
bool test_value_and_state_equals(const container_detail::pair<F, S> &p, int value, int state)
|
||||
bool test_value_and_state_equals(const dtl::pair<F, S> &p, int value, int state)
|
||||
{ return test_value_and_state_equals(p.first, value, state) && test_alloc_state_equals(p.second, value, state); }
|
||||
|
||||
template<class F, class S>
|
||||
|
||||
+7
-7
@@ -30,11 +30,11 @@ namespace container {
|
||||
namespace test{
|
||||
|
||||
template<class C>
|
||||
void set_test_rebalanceable(C &, boost::container::container_detail::false_type)
|
||||
void set_test_rebalanceable(C &, boost::container::dtl::false_type)
|
||||
{}
|
||||
|
||||
template<class C>
|
||||
void set_test_rebalanceable(C &c, boost::container::container_detail::true_type)
|
||||
void set_test_rebalanceable(C &c, boost::container::dtl::true_type)
|
||||
{
|
||||
c.rebalance();
|
||||
}
|
||||
@@ -43,7 +43,7 @@ template<class MyBoostSet
|
||||
,class MyStdSet
|
||||
,class MyBoostMultiSet
|
||||
,class MyStdMultiSet>
|
||||
int set_test_copyable(boost::container::container_detail::false_type)
|
||||
int set_test_copyable(boost::container::dtl::false_type)
|
||||
{ return 0; }
|
||||
|
||||
const int MaxElem = 50;
|
||||
@@ -52,7 +52,7 @@ template<class MyBoostSet
|
||||
,class MyStdSet
|
||||
,class MyBoostMultiSet
|
||||
,class MyStdMultiSet>
|
||||
int set_test_copyable(boost::container::container_detail::true_type)
|
||||
int set_test_copyable(boost::container::dtl::true_type)
|
||||
{
|
||||
typedef typename MyBoostSet::value_type IntType;
|
||||
|
||||
@@ -564,13 +564,13 @@ int set_test ()
|
||||
return 1;
|
||||
}
|
||||
set_test_rebalanceable(boostset
|
||||
, container_detail::bool_<has_member_function_callable_with_rebalance<MyBoostSet>::value>());
|
||||
, dtl::bool_<has_member_function_callable_with_rebalance<MyBoostSet>::value>());
|
||||
if(!CheckEqualContainers(boostset, stdset)){
|
||||
std::cout << "Error in boostset.rebalance()" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
set_test_rebalanceable(boostmultiset
|
||||
, container_detail::bool_<has_member_function_callable_with_rebalance<MyBoostMultiSet>::value>());
|
||||
, dtl::bool_<has_member_function_callable_with_rebalance<MyBoostMultiSet>::value>());
|
||||
if(!CheckEqualContainers(boostmultiset, stdmultiset)){
|
||||
std::cout << "Error in boostmultiset.rebalance()" << std::endl;
|
||||
return 1;
|
||||
@@ -794,7 +794,7 @@ int set_test ()
|
||||
}
|
||||
|
||||
if(set_test_copyable<MyBoostSet, MyStdSet, MyBoostMultiSet, MyStdMultiSet>
|
||||
(container_detail::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
(dtl::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ namespace container {
|
||||
|
||||
//Explicit instantiation to detect compilation errors
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
//Instantiate base class as previous instantiations don't instantiate inherited members
|
||||
template class tree
|
||||
@@ -73,7 +73,7 @@ template class tree
|
||||
, tree_assoc_defaults
|
||||
>;
|
||||
|
||||
} //container_detail {
|
||||
} //dtl {
|
||||
|
||||
}} //boost::container
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ template class boost::container::vector
|
||||
< test::movable_and_copyable_int
|
||||
, allocator<test::movable_and_copyable_int> >;
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template class vec_iterator<int*, true >;
|
||||
template class vec_iterator<int*, false>;
|
||||
|
||||
@@ -55,13 +55,13 @@ struct vector_hash_function_capacity
|
||||
};
|
||||
|
||||
template<class V1, class V2>
|
||||
bool vector_vector_hash_function_capacity_only(V1&, V2&, boost::container::container_detail::false_type)
|
||||
bool vector_vector_hash_function_capacity_only(V1&, V2&, boost::container::dtl::false_type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
template<class MyBoostVector, class MyStdVector>
|
||||
bool vector_vector_hash_function_capacity_only(MyBoostVector&boostvector, MyStdVector&stdvector, boost::container::container_detail::true_type)
|
||||
bool vector_vector_hash_function_capacity_only(MyBoostVector&boostvector, MyStdVector&stdvector, boost::container::dtl::true_type)
|
||||
{
|
||||
//deque has no reserve
|
||||
boostvector.reserve(boostvector.size()*2);
|
||||
@@ -89,14 +89,14 @@ bool vector_vector_hash_function_capacity_only(MyBoostVector&boostvector, MyStdV
|
||||
|
||||
|
||||
template<class V1, class V2>
|
||||
bool vector_copyable_only(V1&, V2&, boost::container::container_detail::false_type)
|
||||
bool vector_copyable_only(V1&, V2&, boost::container::dtl::false_type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//Function to check if both sets are equal
|
||||
template<class MyBoostVector, class MyStdVector>
|
||||
bool vector_copyable_only(MyBoostVector &boostvector, MyStdVector &stdvector, boost::container::container_detail::true_type)
|
||||
bool vector_copyable_only(MyBoostVector &boostvector, MyStdVector &stdvector, boost::container::dtl::true_type)
|
||||
{
|
||||
typedef typename MyBoostVector::value_type IntType;
|
||||
std::size_t size = boostvector.size();
|
||||
@@ -403,7 +403,7 @@ int vector_test()
|
||||
}
|
||||
|
||||
if(!vector_copyable_only(boostvector, stdvector
|
||||
,container_detail::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
,dtl::bool_<boost::container::test::is_copyable<IntType>::value>())){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ int vector_test()
|
||||
if(!test::CheckEqualContainers(boostvector, stdvector)) return 1;
|
||||
}
|
||||
|
||||
if(!vector_vector_hash_function_capacity_only(boostvector, stdvector, container_detail::bool_<vector_hash_function_capacity<MyBoostVector>::value>()))
|
||||
if(!vector_vector_hash_function_capacity_only(boostvector, stdvector, dtl::bool_<vector_hash_function_capacity<MyBoostVector>::value>()))
|
||||
return 1;
|
||||
|
||||
boostvector.clear();
|
||||
|
||||
Reference in new issue
Block a user