Addd new constructors to containers, according to C++14's new constructors taking allocator arguments.

This commit is contained in:
Ion Gaztañaga
2015-02-03 14:08:29 +01:00
parent a7adc46a54
commit 22f1d32f7b
15 changed files with 349 additions and 9 deletions

View File

@@ -120,6 +120,17 @@ bool default_init_test()//Test for default initialization
return false;
}
}
{
test::default_init_allocator<int>::reset_pattern(0);
test::default_init_allocator<int>::set_ascending(true);
IntDefaultInitAllocVector v(Capacity, default_init, test::default_init_allocator<int>());
typename IntDefaultInitAllocVector::iterator it = v.begin();
//Compare with the pattern
for(std::size_t i = 0; i != Capacity; ++i, ++it){
if(!test::check_ascending_byte_pattern(*it))
return false;
}
}
{
test::default_init_allocator<int>::reset_pattern(100);
test::default_init_allocator<int>::set_ascending(false);