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
5#include "test.hpp"
6
7#include <boost/typeof/std/string.hpp>
8#include <boost/typeof/std/deque.hpp>
9#include <boost/typeof/std/list.hpp>
10#include <boost/typeof/std/queue.hpp>
11#include <boost/typeof/std/stack.hpp>
12#include <boost/typeof/std/vector.hpp>
13#include <boost/typeof/std/map.hpp>
14#include <boost/typeof/std/set.hpp>
15#include <boost/typeof/std/bitset.hpp>
16#include <boost/typeof/std/functional.hpp>
17#include <boost/typeof/std/valarray.hpp>
18#include <boost/typeof/std/locale.hpp>
19#include <boost/typeof/std/iostream.hpp>
20#include <boost/typeof/std/streambuf.hpp>
21#include <boost/typeof/std/istream.hpp>
22#include <boost/typeof/std/ostream.hpp>
23#include <boost/typeof/std/sstream.hpp>
24#include <boost/typeof/std/fstream.hpp>
25#include <boost/typeof/std/iterator.hpp>
26
27using namespace std;
28
29// STL containers
30
31BOOST_STATIC_ASSERT(boost::type_of::test<string>::value);
32BOOST_STATIC_ASSERT(boost::type_of::test<deque<int> >::value);
33BOOST_STATIC_ASSERT(boost::type_of::test<list<int> >::value);
34BOOST_STATIC_ASSERT(boost::type_of::test<queue<int> >::value);
35BOOST_STATIC_ASSERT(boost::type_of::test<stack<int> >::value);
36BOOST_STATIC_ASSERT(boost::type_of::test<vector<int> >::value);
37BOOST_STATIC_ASSERT((boost::type_of::test<map<int, int> >::value));
38BOOST_STATIC_ASSERT((boost::type_of::test<multimap<int, int> >::value));
39BOOST_STATIC_ASSERT(boost::type_of::test<set<int> >::value);
40BOOST_STATIC_ASSERT(boost::type_of::test<multiset<int> >::value);
41BOOST_STATIC_ASSERT(boost::type_of::test<bitset<10> >::value);
42
43// function objects
44
45#ifndef BOOST_NO_CXX98_FUNCTION_BASE
46BOOST_STATIC_ASSERT((boost::type_of::test<unary_function<int, int> >::value));
47BOOST_STATIC_ASSERT((boost::type_of::test<binary_function<int, int, int> >::value));
48#endif//BOOST_NO_CXX98_FUNCTION_BASE
49
50BOOST_STATIC_ASSERT(boost::type_of::test<plus<int> >::value);
51BOOST_STATIC_ASSERT(boost::type_of::test<minus<int> >::value);
52BOOST_STATIC_ASSERT(boost::type_of::test<multiplies<int> >::value);
53BOOST_STATIC_ASSERT(boost::type_of::test<divides<int> >::value);
54BOOST_STATIC_ASSERT(boost::type_of::test<modulus<int> >::value);
55BOOST_STATIC_ASSERT(boost::type_of::test<negate<int> >::value);
56BOOST_STATIC_ASSERT(boost::type_of::test<equal_to<int> >::value);
57BOOST_STATIC_ASSERT(boost::type_of::test<not_equal_to<int> >::value);
58BOOST_STATIC_ASSERT(boost::type_of::test<greater<int> >::value);
59BOOST_STATIC_ASSERT(boost::type_of::test<less<int> >::value);
60BOOST_STATIC_ASSERT(boost::type_of::test<greater_equal<int> >::value);
61BOOST_STATIC_ASSERT(boost::type_of::test<less_equal<int> >::value);
62BOOST_STATIC_ASSERT(boost::type_of::test<logical_and<int> >::value);
63BOOST_STATIC_ASSERT(boost::type_of::test<logical_or<int> >::value);
64BOOST_STATIC_ASSERT(boost::type_of::test<logical_not<int> >::value);
65
66#if BOOST_CXX_VERSION < 202000L
67BOOST_STATIC_ASSERT(boost::type_of::test<unary_negate<negate<int> > >::value);
68BOOST_STATIC_ASSERT(boost::type_of::test<binary_negate<less<int> > >::value);
69#endif
70
71#ifndef BOOST_NO_CXX98_BINDERS
72BOOST_STATIC_ASSERT(boost::type_of::test<binder1st<less<int> > >::value);
73BOOST_STATIC_ASSERT(boost::type_of::test<binder2nd<less<int> > >::value);
74#endif//BOOST_NO_CXX98_BINDERS
75
76// valarray
77
78BOOST_STATIC_ASSERT(boost::type_of::test<valarray<int> >::value);
79

source code of boost/libs/typeof/test/std.cpp