std.cpp 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Copyright (C) 2006 Arkadiy Vertleyb
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
  4. #include "test.hpp"
  5. #include <boost/typeof/std/string.hpp>
  6. #include <boost/typeof/std/deque.hpp>
  7. #include <boost/typeof/std/list.hpp>
  8. #include <boost/typeof/std/queue.hpp>
  9. #include <boost/typeof/std/stack.hpp>
  10. #include <boost/typeof/std/vector.hpp>
  11. #include <boost/typeof/std/map.hpp>
  12. #include <boost/typeof/std/set.hpp>
  13. #include <boost/typeof/std/bitset.hpp>
  14. #include <boost/typeof/std/functional.hpp>
  15. #include <boost/typeof/std/valarray.hpp>
  16. #include <boost/typeof/std/locale.hpp>
  17. #include <boost/typeof/std/iostream.hpp>
  18. #include <boost/typeof/std/streambuf.hpp>
  19. #include <boost/typeof/std/istream.hpp>
  20. #include <boost/typeof/std/ostream.hpp>
  21. #include <boost/typeof/std/sstream.hpp>
  22. #include <boost/typeof/std/fstream.hpp>
  23. #include <boost/typeof/std/iterator.hpp>
  24. using namespace std;
  25. // STL containers
  26. BOOST_STATIC_ASSERT(boost::type_of::test<string>::value);
  27. BOOST_STATIC_ASSERT(boost::type_of::test<deque<int> >::value);
  28. BOOST_STATIC_ASSERT(boost::type_of::test<list<int> >::value);
  29. BOOST_STATIC_ASSERT(boost::type_of::test<queue<int> >::value);
  30. BOOST_STATIC_ASSERT(boost::type_of::test<stack<int> >::value);
  31. BOOST_STATIC_ASSERT(boost::type_of::test<vector<int> >::value);
  32. BOOST_STATIC_ASSERT((boost::type_of::test<map<int, int> >::value));
  33. BOOST_STATIC_ASSERT((boost::type_of::test<multimap<int, int> >::value));
  34. BOOST_STATIC_ASSERT(boost::type_of::test<set<int> >::value);
  35. BOOST_STATIC_ASSERT(boost::type_of::test<multiset<int> >::value);
  36. BOOST_STATIC_ASSERT(boost::type_of::test<bitset<10> >::value);
  37. // function objects
  38. #ifndef BOOST_NO_CXX98_FUNCTION_BASE
  39. BOOST_STATIC_ASSERT((boost::type_of::test<unary_function<int, int> >::value));
  40. BOOST_STATIC_ASSERT((boost::type_of::test<binary_function<int, int, int> >::value));
  41. #endif//BOOST_NO_CXX98_FUNCTION_BASE
  42. BOOST_STATIC_ASSERT(boost::type_of::test<plus<int> >::value);
  43. BOOST_STATIC_ASSERT(boost::type_of::test<minus<int> >::value);
  44. BOOST_STATIC_ASSERT(boost::type_of::test<multiplies<int> >::value);
  45. BOOST_STATIC_ASSERT(boost::type_of::test<divides<int> >::value);
  46. BOOST_STATIC_ASSERT(boost::type_of::test<modulus<int> >::value);
  47. BOOST_STATIC_ASSERT(boost::type_of::test<negate<int> >::value);
  48. BOOST_STATIC_ASSERT(boost::type_of::test<equal_to<int> >::value);
  49. BOOST_STATIC_ASSERT(boost::type_of::test<not_equal_to<int> >::value);
  50. BOOST_STATIC_ASSERT(boost::type_of::test<greater<int> >::value);
  51. BOOST_STATIC_ASSERT(boost::type_of::test<less<int> >::value);
  52. BOOST_STATIC_ASSERT(boost::type_of::test<greater_equal<int> >::value);
  53. BOOST_STATIC_ASSERT(boost::type_of::test<less_equal<int> >::value);
  54. BOOST_STATIC_ASSERT(boost::type_of::test<logical_and<int> >::value);
  55. BOOST_STATIC_ASSERT(boost::type_of::test<logical_or<int> >::value);
  56. BOOST_STATIC_ASSERT(boost::type_of::test<logical_not<int> >::value);
  57. BOOST_STATIC_ASSERT(boost::type_of::test<unary_negate<negate<int> > >::value);
  58. BOOST_STATIC_ASSERT(boost::type_of::test<binary_negate<less<int> > >::value);
  59. #ifndef BOOST_NO_CXX98_BINDERS
  60. BOOST_STATIC_ASSERT(boost::type_of::test<binder1st<less<int> > >::value);
  61. BOOST_STATIC_ASSERT(boost::type_of::test<binder2nd<less<int> > >::value);
  62. #endif//BOOST_NO_CXX98_BINDERS
  63. // valarray
  64. BOOST_STATIC_ASSERT(boost::type_of::test<valarray<int> >::value);