explicit_inst_string_test.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/string.hpp>
  11. template class ::boost::container::basic_string<char>;
  12. volatile ::boost::container::basic_string<char> dummy;
  13. #include <boost/container/vector.hpp>
  14. #include "dummy_test_allocator.hpp"
  15. namespace boost {
  16. namespace container {
  17. typedef test::simple_allocator<char> SimpleCharAllocator;
  18. typedef basic_string<char, std::char_traits<char>, SimpleCharAllocator> SimpleString;
  19. typedef test::simple_allocator<SimpleString> SimpleStringAllocator;
  20. typedef test::simple_allocator<wchar_t> SimpleWCharAllocator;
  21. typedef basic_string<wchar_t, std::char_traits<wchar_t>, SimpleWCharAllocator> SimpleWString;
  22. typedef test::simple_allocator<SimpleWString> SimpleWStringAllocator;
  23. //Explicit instantiations of container::basic_string
  24. template class basic_string<char, std::char_traits<char>, SimpleCharAllocator>;
  25. template class basic_string<wchar_t, std::char_traits<wchar_t>, SimpleWCharAllocator>;
  26. template class basic_string<char, std::char_traits<char>, std::allocator<char> >;
  27. template class basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >;
  28. //Explicit instantiation of container::vectors of container::strings
  29. template class vector<SimpleString, SimpleStringAllocator>;
  30. template class vector<SimpleWString, SimpleWStringAllocator>;
  31. }}
  32. int main()
  33. {
  34. return 0;
  35. }