forked from boostorg/container
Include <memory> as std::allocator is used
This commit is contained in:
@ -13,6 +13,7 @@
|
|||||||
#include <boost/move/traits.hpp>
|
#include <boost/move/traits.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <memory> //for std::allocator
|
||||||
|
|
||||||
#include "movable_int.hpp"
|
#include "movable_int.hpp"
|
||||||
#include "dummy_test_allocator.hpp"
|
#include "dummy_test_allocator.hpp"
|
||||||
@ -83,32 +84,5 @@ template class tree
|
|||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
////////////////////////////////////
|
|
||||||
// has_trivial_destructor_after_move testing
|
|
||||||
////////////////////////////////////
|
|
||||||
// default
|
|
||||||
{
|
|
||||||
typedef boost::container::dtl::tree<int, void, std::less<int>, void, void> tree;
|
|
||||||
typedef tree::allocator_type allocator_type;
|
|
||||||
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
|
|
||||||
typedef tree::key_compare key_compare;
|
|
||||||
BOOST_STATIC_ASSERT_MSG((boost::has_trivial_destructor_after_move<tree>::value ==
|
|
||||||
boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
|
||||||
boost::has_trivial_destructor_after_move<pointer>::value &&
|
|
||||||
boost::has_trivial_destructor_after_move<key_compare>::value), "has_trivial_destructor_after_move(default allocator) test failed");
|
|
||||||
}
|
|
||||||
// std::allocator
|
|
||||||
{
|
|
||||||
typedef boost::container::dtl::tree<int, void, std::less<int>, std::allocator<int>, void> tree;
|
|
||||||
typedef tree::allocator_type allocator_type;
|
|
||||||
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
|
|
||||||
typedef tree::key_compare key_compare;
|
|
||||||
BOOST_STATIC_ASSERT_MSG ((boost::has_trivial_destructor_after_move<tree>::value ==
|
|
||||||
boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
|
||||||
boost::has_trivial_destructor_after_move<pointer>::value &&
|
|
||||||
boost::has_trivial_destructor_after_move<key_compare>::value)
|
|
||||||
, "has_trivial_destructor_after_move(std::allocator) test failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user