explicit_inst_set_test.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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/set.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::set<empty>;
  17. template class ::boost::container::multiset<empty>;
  18. volatile ::boost::container::set<empty> dummy;
  19. volatile ::boost::container::multiset<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. //Explicit instantiation to detect compilation errors
  27. //set
  28. template class set
  29. < test::movable_and_copyable_int
  30. , std::less<test::movable_and_copyable_int>
  31. , test::simple_allocator<test::movable_and_copyable_int>
  32. >;
  33. //multiset
  34. template class multiset
  35. < test::movable_and_copyable_int
  36. , std::less<test::movable_and_copyable_int>
  37. , adaptive_pool<test::movable_and_copyable_int>
  38. >;
  39. }} //boost::container
  40. int main()
  41. {
  42. return 0;
  43. }