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 "test.hpp"
7 #include "check_integral_constant.hpp"
8 
9 #include <boost/type_traits/has_operator.hpp>
10 #include "has_postfix_classes.hpp"
11 
12 TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
13    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, void >::value), 1);
14    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret >::value), 0);
15    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret const >::value), 0);
16    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret & >::value), 0);
17    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret const & >::value), 0);
18    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, void >::value), 1);
19    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret >::value), 0);
20    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret const >::value), 0);
21    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret & >::value), 0);
22    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret const & >::value), 0);
23    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, void >::value), 1);
24    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret >::value), 0);
25    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret const >::value), 0);
26    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret & >::value), 0);
27    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret const & >::value), 0);
28    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, void >::value), 1);
29    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret >::value), 0);
30    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret const >::value), 0);
31    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret & >::value), 0);
32    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret const & >::value), 0);
33    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, void >::value), 0);
34    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret >::value), 1);
35    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret const >::value), 1);
36    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret & >::value), 0);
37    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret const & >::value), 1);
38    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, void >::value), 0);
39    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret >::value), 1);
40    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret const >::value), 1);
41    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret & >::value), 0);
42    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret const & >::value), 1);
43    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, void >::value), 0);
44    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret >::value), 1);
45    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret const >::value), 1);
46    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret & >::value), 0);
47    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret const & >::value), 1);
48    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, void >::value), 0);
49    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret >::value), 1);
50    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret const >::value), 1);
51    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret & >::value), 0);
52    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret const & >::value), 1);
53    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, void >::value), 0);
54    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret >::value), 1);
55    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret const >::value), 1);
56    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret & >::value), 0);
57    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret const & >::value), 1);
58    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, void >::value), 0);
59    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret >::value), 1);
60    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret const >::value), 1);
61    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret & >::value), 0);
62    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret const & >::value), 1);
63    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, void >::value), 0);
64    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret >::value), 1);
65    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret const >::value), 1);
66    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret & >::value), 0);
67    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret const & >::value), 1);
68    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, void >::value), 0);
69    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret >::value), 1);
70    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret const >::value), 1);
71    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret & >::value), 0);
72    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret const & >::value), 1);
73    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, void >::value), 0);
74    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret >::value), 1);
75    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret const >::value), 1);
76    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret & >::value), 1);
77    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret const & >::value), 1);
78    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, void >::value), 0);
79    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret >::value), 1);
80    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret const >::value), 1);
81    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret & >::value), 1);
82    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret const & >::value), 1);
83    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, void >::value), 0);
84    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret >::value), 1);
85    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret const >::value), 1);
86    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret & >::value), 1);
87    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret const & >::value), 1);
88    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, void >::value), 0);
89    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret >::value), 1);
90    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret const >::value), 1);
91    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret & >::value), 1);
92    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret const & >::value), 1);
93    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, void >::value), 0);
94    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret >::value), 1);
95    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret const >::value), 1);
96    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret & >::value), 0);
97    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret const & >::value), 1);
98    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, void >::value), 0);
99    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret >::value), 1);
100    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret const >::value), 1);
101    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret & >::value), 0);
102    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret const & >::value), 1);
103    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, void >::value), 0);
104    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret >::value), 1);
105    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret const >::value), 1);
106    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret & >::value), 0);
107    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret const & >::value), 1);
108    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, void >::value), 0);
109    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret >::value), 1);
110    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret const >::value), 1);
111    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret & >::value), 0);
112    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret const & >::value), 1);
113 TT_TEST_END
114