Introducing allocator_traits and pointer_traits changes into several libraries.

[SVN r76107]
This commit is contained in:
Ion Gaztañaga
2011-12-22 20:15:57 +00:00
parent 935a534713
commit e7bae62301
26 changed files with 1953 additions and 313 deletions
+25 -2
View File
@@ -21,13 +21,25 @@
#include "expand_bwd_test_allocator.hpp"
#include "expand_bwd_test_template.hpp"
#include "dummy_test_allocator.hpp"
#include "propagate_allocator_test.hpp"
#include "vector_test.hpp"
using namespace boost::container;
namespace boost {
namespace container {
//Explicit instantiation to detect compilation errors
//template class stable_vector<test::movable_and_copyable_int,
//test::dummy_test_allocator<test::movable_and_copyable_int> >;
template class stable_vector<test::movable_and_copyable_int,
test::dummy_test_allocator<test::movable_and_copyable_int> >;
template class stable_vector<test::movable_and_copyable_int,
test::simple_allocator<test::movable_and_copyable_int> >;
template class stable_vector<test::movable_and_copyable_int,
std::allocator<test::movable_and_copyable_int> >;
}}
class recursive_vector
{
@@ -58,6 +70,14 @@ int main()
move_assign = boost::move(move_ctor);
move_assign.swap(original);
}
//Test non-copy-move operations
{
stable_vector<test::non_copymovable_int> sv;
sv.emplace_back();
sv.resize(10);
sv.resize(1);
}
typedef stable_vector<int> MyVector;
typedef stable_vector<test::movable_int> MyMoveVector;
typedef stable_vector<test::movable_and_copyable_int> MyCopyMoveVector;
@@ -80,6 +100,9 @@ int main()
< stable_vector<test::EmplaceInt>, Options>())
return 1;
if(!boost::container::test::test_propagate_allocator<stable_vector>())
return 1;
return 0;
}