mirror of
https://github.com/boostorg/container.git
synced 2026-07-11 00:10:57 +02:00
Introducing allocator_traits and pointer_traits changes into several libraries.
[SVN r76107]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user