container_fwd_test.cpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. // Copyright 2005-2009 Daniel James.
  2. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #include <boost/detail/container_fwd.hpp>
  5. #if BOOST_WORKAROUND(__GNUC__, < 3) && \
  6. !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
  7. template <class charT, class Allocator>
  8. static void test(
  9. std::basic_string<charT, std::string_char_traits<charT>, Allocator> const&)
  10. {
  11. }
  12. #else
  13. template <class charT, class Allocator>
  14. static void test(
  15. std::basic_string<charT, std::char_traits<charT>, Allocator> const&)
  16. {
  17. }
  18. #endif
  19. template <class T, class Allocator>
  20. static void test(std::deque<T, Allocator> const&)
  21. {
  22. }
  23. template <class T, class Allocator>
  24. static void test(std::list<T, Allocator> const&)
  25. {
  26. }
  27. template <class T, class Allocator>
  28. static void test(std::vector<T, Allocator> const&)
  29. {
  30. }
  31. template <class Key, class T, class Compare, class Allocator>
  32. static void test(std::map<Key, T, Compare, Allocator> const&)
  33. {
  34. }
  35. template <class Key, class T, class Compare, class Allocator>
  36. static void test(std::multimap<Key, T, Compare, Allocator> const&)
  37. {
  38. }
  39. template <class Key, class Compare, class Allocator>
  40. static void test(std::set<Key, Compare, Allocator> const&)
  41. {
  42. }
  43. template <class Key, class Compare, class Allocator>
  44. static void test(std::multiset<Key, Compare, Allocator> const&)
  45. {
  46. }
  47. template <std::size_t N>
  48. static void test(std::bitset<N> const&)
  49. {
  50. }
  51. template <class T>
  52. static void test(std::complex<T> const&)
  53. {
  54. }
  55. template <class X, class Y>
  56. static void test(std::pair<X, Y> const&)
  57. {
  58. }
  59. #include <deque>
  60. #include <list>
  61. #include <vector>
  62. #include <map>
  63. #include <set>
  64. #include <bitset>
  65. #include <string>
  66. #include <complex>
  67. #include <utility>
  68. int main()
  69. {
  70. std::deque<int> x1;
  71. std::list<std::string> x2;
  72. std::vector<float> x3;
  73. std::vector<bool> x4;
  74. std::map<int, int> x5;
  75. std::multimap<float, int*> x6;
  76. std::set<std::string> x7;
  77. std::multiset<std::vector<int> > x8;
  78. std::bitset<10> x9;
  79. std::string x10;
  80. std::complex<double> x11;
  81. std::pair<std::list<int>, char***> x12;
  82. test(x1);
  83. test(x2);
  84. test(x3);
  85. test(x4);
  86. test(x5);
  87. test(x6);
  88. test(x7);
  89. test(x8);
  90. test(x9);
  91. test(x10);
  92. test(x11);
  93. test(x12);
  94. return 0;
  95. }