forked from boostorg/container
Improve allocator propagation test with new constructors and refactor code to avoid too many wrappers.
This commit is contained in:
+17
-1
@@ -150,6 +150,22 @@ bool test_support_for_initializer_list()
|
||||
return true;
|
||||
}
|
||||
|
||||
struct boost_container_list;
|
||||
|
||||
namespace boost { namespace container { namespace test {
|
||||
|
||||
template<>
|
||||
struct alloc_propagate_base<boost_container_list>
|
||||
{
|
||||
template <class T, class Allocator>
|
||||
struct apply
|
||||
{
|
||||
typedef boost::container::list<T, Allocator> type;
|
||||
};
|
||||
};
|
||||
|
||||
}}} //namespace boost::container::test
|
||||
|
||||
int main ()
|
||||
{
|
||||
recursive_list_test();
|
||||
@@ -197,7 +213,7 @@ int main ()
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<list>())
|
||||
if(!boost::container::test::test_propagate_allocator<boost_container_list>())
|
||||
return 1;
|
||||
|
||||
if(!test_support_for_initializer_list())
|
||||
|
||||
Reference in New Issue
Block a user