bench_set_adaptive_pool.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2013-2013. Distributed under the Boost
  4. // Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/container for documentation.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //Enable checks in debug mode
  11. #ifndef NDEBUG
  12. #define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
  13. #endif
  14. #include "bench_set.hpp"
  15. #include <boost/container/set.hpp>
  16. #include <boost/container/allocator.hpp>
  17. #include <boost/container/adaptive_pool.hpp>
  18. int main()
  19. {
  20. using namespace boost::container;
  21. fill_range_ints();
  22. fill_range_strings();
  23. //set<..., adaptive_pool> vs. set
  24. launch_tests< set<int, std::less<int>, private_adaptive_pool<int> >, set<int> >
  25. ("set<int, ..., private_adaptive_pool<int>", "set<int>");
  26. launch_tests< set<string, std::less<string>, private_adaptive_pool<string> >, set<string> >
  27. ("set<string, ..., private_adaptive_pool<string>", "set<string>");
  28. return 0;
  29. }