Improve allocator propagation test with new constructors and refactor code to avoid too many wrappers.

This commit is contained in:
Ion Gaztañaga
2015-02-26 00:31:19 +01:00
parent 7160bea2aa
commit 6c5e527c60
14 changed files with 548 additions and 302 deletions

View File

@@ -145,6 +145,22 @@ int test_cont_variants()
return 0;
}
struct boost_container_vector;
namespace boost { namespace container { namespace test {
template<>
struct alloc_propagate_base<boost_container_vector>
{
template <class T, class Allocator>
struct apply
{
typedef boost::container::vector<T, Allocator> type;
};
};
}}} //namespace boost::container::test
int main()
{
{
@@ -235,7 +251,7 @@ int main()
////////////////////////////////////
// Allocator propagation testing
////////////////////////////////////
if(!boost::container::test::test_propagate_allocator<vector>()){
if(!boost::container::test::test_propagate_allocator<boost_container_vector>()){
return 1;
}