summaryrefslogtreecommitdiff
path: root/libs/container/test/stable_vector_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/container/test/stable_vector_test.cpp')
-rw-r--r--libs/container/test/stable_vector_test.cpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/libs/container/test/stable_vector_test.cpp b/libs/container/test/stable_vector_test.cpp
index eeb3c7faf..3ff73e3e4 100644
--- a/libs/container/test/stable_vector_test.cpp
+++ b/libs/container/test/stable_vector_test.cpp
@@ -9,11 +9,7 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/detail/config_begin.hpp>
-#include <algorithm>
#include <memory>
-#include <vector>
-#include <iostream>
-#include <functional>
#include <boost/container/stable_vector.hpp>
#include <boost/container/allocator.hpp>
@@ -70,7 +66,7 @@ class recursive_vector
stable_vector<recursive_vector>::const_iterator cit_;
stable_vector<recursive_vector>::reverse_iterator rit_;
stable_vector<recursive_vector>::const_reverse_iterator crit_;
-
+
recursive_vector &operator=(const recursive_vector &o)
{ vector_ = o.vector_; return *this; }
};
@@ -117,6 +113,23 @@ int test_cont_variants()
return 0;
}
+struct boost_container_stable_vector;
+
+namespace boost { namespace container { namespace test {
+
+template<>
+struct alloc_propagate_base<boost_container_stable_vector>
+{
+ template <class T, class Allocator>
+ struct apply
+ {
+ typedef boost::container::stable_vector<T, Allocator> type;
+ };
+};
+
+}}} //namespace boost::container::test
+
+
int main()
{
recursive_vector_test();
@@ -180,15 +193,14 @@ int main()
////////////////////////////////////
// Allocator propagation testing
////////////////////////////////////
- if(!boost::container::test::test_propagate_allocator<stable_vector>())
+ if(!boost::container::test::test_propagate_allocator<boost_container_stable_vector>())
return 1;
////////////////////////////////////
// Initializer lists testing
////////////////////////////////////
- if(!boost::container::test::test_vector_methods_with_initializer_list_as_argument_for<
- boost::container::stable_vector<int>
- >())
+ if(!boost::container::test::test_vector_methods_with_initializer_list_as_argument_for
+ < boost::container::stable_vector<int> >())
{
std::cerr << "test_methods_with_initializer_list_as_argument failed" << std::endl;
return 1;