explicit_inst_static_vector_test.cpp 944 B

123456789101112131415161718192021222324252627282930313233
  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/static_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::static_vector<empty, 2>;
  17. volatile ::boost::container::static_vector<empty, 2> dummy;
  18. namespace boost {
  19. namespace container {
  20. //Explicit instantiation to detect compilation errors
  21. template class boost::container::static_vector<int, 10>;
  22. }}
  23. int main()
  24. {
  25. return 0;
  26. }