1 //  (C) Copyright 2009-2011 Frederic Bron.
2 //  Use, modification and distribution are subject to the
3 //  Boost Software License, Version 1.0. (See accompanying file
4 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #include <boost/type_traits/has_operator.hpp>
7 #include "test.hpp"
8 #include "check_integral_constant.hpp"
9 #include "has_postfix_classes.hpp"
10 
11 TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
12    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, void >::value), 1);
13    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret >::value), 0);
14    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret const >::value), 0);
15    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret & >::value), 0);
16    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret const & >::value), 0);
17    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, void >::value), 1);
18    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret >::value), 0);
19    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret const >::value), 0);
20    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret & >::value), 0);
21    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret const & >::value), 0);
22    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, void >::value), 1);
23    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret >::value), 0);
24    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret const >::value), 0);
25    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret & >::value), 0);
26    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret const & >::value), 0);
27    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, void >::value), 1);
28    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret >::value), 0);
29    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret const >::value), 0);
30    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret & >::value), 0);
31    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret const & >::value), 0);
32    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, void >::value), 0);
33    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret >::value), 1);
34    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret const >::value), 1);
35    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret & >::value), 0);
36    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret const & >::value), 1);
37    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, void >::value), 0);
38    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret >::value), 1);
39    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret const >::value), 1);
40    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret & >::value), 0);
41    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret const & >::value), 1);
42    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, void >::value), 0);
43    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret >::value), 1);
44    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret const >::value), 1);
45    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret & >::value), 0);
46    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret const & >::value), 1);
47    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, void >::value), 0);
48    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret >::value), 1);
49    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret const >::value), 1);
50    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret & >::value), 0);
51    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret const & >::value), 1);
52    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, void >::value), 0);
53    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret >::value), 1);
54    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret const >::value), 1);
55    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret & >::value), 0);
56    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret const & >::value), 1);
57    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, void >::value), 0);
58    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret >::value), 1);
59    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret const >::value), 1);
60    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret & >::value), 0);
61    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret const & >::value), 1);
62    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, void >::value), 0);
63    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret >::value), 1);
64    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret const >::value), 1);
65    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret & >::value), 0);
66    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret const & >::value), 1);
67    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, void >::value), 0);
68    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret >::value), 1);
69    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret const >::value), 1);
70    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret & >::value), 0);
71    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret const & >::value), 1);
72    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, void >::value), 0);
73    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret >::value), 1);
74    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret const >::value), 1);
75    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret & >::value), 1);
76    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret const & >::value), 1);
77    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, void >::value), 0);
78    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret >::value), 1);
79    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret const >::value), 1);
80    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret & >::value), 1);
81    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret const & >::value), 1);
82    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, void >::value), 0);
83    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret >::value), 1);
84    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret const >::value), 1);
85    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret & >::value), 1);
86    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret const & >::value), 1);
87    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, void >::value), 0);
88    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret >::value), 1);
89    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret const >::value), 1);
90    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret & >::value), 1);
91    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret const & >::value), 1);
92    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, void >::value), 0);
93    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret >::value), 1);
94    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret const >::value), 1);
95    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret & >::value), 0);
96    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret const & >::value), 1);
97    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, void >::value), 0);
98    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret >::value), 1);
99    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret const >::value), 1);
100    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret & >::value), 0);
101    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret const & >::value), 1);
102    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, void >::value), 0);
103    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret >::value), 1);
104    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret const >::value), 1);
105    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret & >::value), 0);
106    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret const & >::value), 1);
107    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, void >::value), 0);
108    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret >::value), 1);
109    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret const >::value), 1);
110    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret & >::value), 0);
111    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret const & >::value), 1);
112 TT_TEST_END
113