explicit_inst_map_test.cpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2015-2015. 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. #include <boost/container/map.hpp>
  11. struct empty
  12. {
  13. friend bool operator == (const empty &, const empty &){ return true; }
  14. friend bool operator < (const empty &, const empty &){ return true; }
  15. };
  16. template class ::boost::container::map<empty, empty>;
  17. template class ::boost::container::multimap<empty, empty>;
  18. volatile ::boost::container::map<empty, empty> dummy;
  19. volatile ::boost::container::multimap<empty, empty> dummy2;
  20. #include <boost/container/allocator.hpp>
  21. #include <boost/container/adaptive_pool.hpp>
  22. #include "movable_int.hpp"
  23. #include "dummy_test_allocator.hpp"
  24. namespace boost {
  25. namespace container {
  26. typedef std::pair<const test::movable_and_copyable_int, test::movable_and_copyable_int> pair_t;
  27. //Explicit instantiation to detect compilation errors
  28. //map
  29. template class map
  30. < test::movable_and_copyable_int
  31. , test::movable_and_copyable_int
  32. , std::less<test::movable_and_copyable_int>
  33. , test::simple_allocator< pair_t >
  34. >;
  35. template class map
  36. < test::movable_and_copyable_int
  37. , test::movable_and_copyable_int
  38. , std::less<test::movable_and_copyable_int>
  39. , adaptive_pool< pair_t >
  40. >;
  41. }} //boost::container
  42. int main()
  43. {
  44. return 0;
  45. }