explicit_inst_vector_test.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/vector.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::vector<empty>;
  17. volatile ::boost::container::vector<empty> dummy;
  18. #include <boost/container/allocator.hpp>
  19. #include "movable_int.hpp"
  20. #include "dummy_test_allocator.hpp"
  21. namespace boost {
  22. namespace container {
  23. //Explicit instantiation to detect compilation errors
  24. template class boost::container::vector
  25. < test::movable_and_copyable_int
  26. , test::simple_allocator<test::movable_and_copyable_int> >;
  27. template class boost::container::vector
  28. < test::movable_and_copyable_int
  29. , allocator<test::movable_and_copyable_int> >;
  30. template class vec_iterator<int*, true >;
  31. template class vec_iterator<int*, false>;
  32. } //namespace boost {
  33. } //namespace container {
  34. int main()
  35. {
  36. return 0;
  37. }