Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68959 - in sandbox/type_traits: boost/type_traits boost/type_traits/detail libs/type_traits/test
From: frederic.bron_at_[hidden]
Date: 2011-02-16 14:34:28


Author: bronf
Date: 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
New Revision: 68959
URL: http://svn.boost.org/trac/boost/changeset/68959

Log:
operator traits: added #pragma to remove warnings (gcc and msvc), added tests for cv-qualifiers, fixed some bugs for cv-qualifiers
Added:
   sandbox/type_traits/libs/type_traits/test/has_integral_no_constlhs_operator_test.hpp (contents, props changed)
   sandbox/type_traits/libs/type_traits/test/has_no_pointer_no_constlhs_operator_test.hpp (contents, props changed)
Text files modified:
   sandbox/type_traits/boost/type_traits/detail/has_binary_operator.hpp | 24 +
   sandbox/type_traits/boost/type_traits/detail/has_prefix_operator.hpp | 19 +
   sandbox/type_traits/boost/type_traits/has_operator_bit_and_equal.hpp | 5
   sandbox/type_traits/boost/type_traits/has_operator_bit_or_equal.hpp | 5
   sandbox/type_traits/boost/type_traits/has_operator_bit_xor_equal.hpp | 5
   sandbox/type_traits/boost/type_traits/has_operator_divides_equal.hpp | 8
   sandbox/type_traits/boost/type_traits/has_operator_left_shift_equal.hpp | 5
   sandbox/type_traits/boost/type_traits/has_operator_minus_equal.hpp | 6
   sandbox/type_traits/boost/type_traits/has_operator_modulus_equal.hpp | 5
   sandbox/type_traits/boost/type_traits/has_operator_multiplies_equal.hpp | 8
   sandbox/type_traits/boost/type_traits/has_operator_plus_equal.hpp | 6
   sandbox/type_traits/boost/type_traits/has_operator_right_shift_equal.hpp | 5
   sandbox/type_traits/libs/type_traits/test/has_binary_logical_operator_test.hpp | 42 +++
   sandbox/type_traits/libs/type_traits/test/has_binary_minus_operator_test.hpp | 499 ++++++++++++++++++++++++++++++++++++++++
   sandbox/type_traits/libs/type_traits/test/has_binary_plus_operator_test.hpp | 499 ++++++++++++++++++++++++++++++++++++++++
   sandbox/type_traits/libs/type_traits/test/has_comparison_operator_test.hpp | 499 ++++++++++++++++++++++++++++++++++++++++
   sandbox/type_traits/libs/type_traits/test/has_integral_operator_test.hpp | 499 ++++++++++++++++++++++++++++++++++++++++
   sandbox/type_traits/libs/type_traits/test/has_minus_equal_operator_test.hpp | 499 ++++++++++++++++++++++++++++++++++++++++
   sandbox/type_traits/libs/type_traits/test/has_no_pointer_operator_test.hpp | 499 ++++++++++++++++++++++++++++++++++++++++
   sandbox/type_traits/libs/type_traits/test/has_operator_bit_and_equal_test.cpp | 2
   sandbox/type_traits/libs/type_traits/test/has_operator_bit_or_equal_test.cpp | 2
   sandbox/type_traits/libs/type_traits/test/has_operator_bit_xor_equal_test.cpp | 2
   sandbox/type_traits/libs/type_traits/test/has_operator_divides_equal_test.cpp | 2
   sandbox/type_traits/libs/type_traits/test/has_operator_left_shift_equal_test.cpp | 2
   sandbox/type_traits/libs/type_traits/test/has_operator_modulus_equal_test.cpp | 2
   sandbox/type_traits/libs/type_traits/test/has_operator_multiplies_equal_test.cpp | 2
   sandbox/type_traits/libs/type_traits/test/has_operator_right_shift_equal_test.cpp | 2
   sandbox/type_traits/libs/type_traits/test/has_plus_equal_operator_test.hpp | 499 ++++++++++++++++++++++++++++++++++++++++
   sandbox/type_traits/libs/type_traits/test/has_postfix_decrement_operator_test.hpp | 6
   sandbox/type_traits/libs/type_traits/test/has_postfix_increment_operator_test.hpp | 6
   sandbox/type_traits/libs/type_traits/test/has_prefix_complement_operator_test.hpp | 6
   sandbox/type_traits/libs/type_traits/test/has_prefix_decrement_operator_test.hpp | 6
   sandbox/type_traits/libs/type_traits/test/has_prefix_increment_operator_test.hpp | 6
   sandbox/type_traits/libs/type_traits/test/has_prefix_minus_operator_test.hpp | 6
   sandbox/type_traits/libs/type_traits/test/has_prefix_plus_not_operator_test.hpp | 6
   35 files changed, 3672 insertions(+), 22 deletions(-)

Modified: sandbox/type_traits/boost/type_traits/detail/has_binary_operator.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/detail/has_binary_operator.hpp (original)
+++ sandbox/type_traits/boost/type_traits/detail/has_binary_operator.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -11,6 +11,7 @@
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_const.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/type_traits/is_fundamental.hpp>
 #include <boost/type_traits/is_integral.hpp>
@@ -25,6 +26,25 @@
 // should be the last #include
 #include <boost/type_traits/detail/bool_trait_def.hpp>
 
+// cannot include this header without getting warnings of the kind:
+// gcc:
+// warning: value computed is not used
+// warning: comparison between signed and unsigned integer expressions
+// msvc:
+// warning C4018: '<' : signed/unsigned mismatch
+// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
+// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
+// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
+// warning C4804: '<' : unsafe use of type 'bool' in operation
+// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation
+// cannot find another implementation -> declared as system header to suppress these warnings.
+#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
+# pragma GCC system_header
+#elif BOOST_MSVC
+# pragma warning ( push )
+# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 )
+#endif
+
 namespace boost {
 namespace detail {
 
@@ -148,4 +168,8 @@
 
 } // namespace boost
 
+#ifdef BOOST_MSVC
+# pragma warning ( pop )
+#endif
+
 #include <boost/type_traits/detail/bool_trait_undef.hpp>

Modified: sandbox/type_traits/boost/type_traits/detail/has_prefix_operator.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/detail/has_prefix_operator.hpp (original)
+++ sandbox/type_traits/boost/type_traits/detail/has_prefix_operator.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -24,6 +24,21 @@
 // should be the last #include
 #include <boost/type_traits/detail/bool_trait_def.hpp>
 
+// cannot include this header without getting warnings of the kind:
+// gcc:
+// warning: value computed is not used
+// warning: comparison between signed and unsigned integer expressions
+// msvc:
+// warning C4146: unary minus operator applied to unsigned type, result still unsigned
+// warning C4804: '-' : unsafe use of type 'bool' in operation
+// cannot find another implementation -> declared as system header to suppress these warnings.
+#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
+# pragma GCC system_header
+#elif BOOST_MSVC
+# pragma warning ( push )
+# pragma warning ( disable : 4146 4804 )
+#endif
+
 namespace boost {
 namespace detail {
 
@@ -125,4 +140,8 @@
 
 } // namespace boost
 
+#ifdef BOOST_MSVC
+# pragma warning ( pop )
+#endif
+
 #include <boost/type_traits/detail/bool_trait_undef.hpp>

Modified: sandbox/type_traits/boost/type_traits/has_operator_bit_and_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_bit_and_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_bit_and_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -14,13 +14,14 @@
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
    ::boost::type_traits::ice_or<\
- /* two fundamental, one non integral */\
+ /* two fundamental, one non integral or lhs is const*/\
       ::boost::type_traits::ice_and<\
          ::boost::is_fundamental< lhs_nocv >::value,\
          ::boost::is_fundamental< rhs_nocv >::value,\
          ::boost::type_traits::ice_or<\
             ::boost::type_traits::ice_not< ::boost::is_integral< lhs_noref >::value >::value,\
- ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value\
+ ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value,\
+ ::boost::is_const< lhs_noref >::value\
>::value\
>::value,\
       /* one fundamental, one pointer */\

Modified: sandbox/type_traits/boost/type_traits/has_operator_bit_or_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_bit_or_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_bit_or_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -14,13 +14,14 @@
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
    ::boost::type_traits::ice_or<\
- /* two fundamental, one non integral */\
+ /* two fundamental, one non integral or lhs is const*/\
       ::boost::type_traits::ice_and<\
          ::boost::is_fundamental< lhs_nocv >::value,\
          ::boost::is_fundamental< rhs_nocv >::value,\
          ::boost::type_traits::ice_or<\
             ::boost::type_traits::ice_not< ::boost::is_integral< lhs_noref >::value >::value,\
- ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value\
+ ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value,\
+ ::boost::is_const< lhs_noref >::value\
>::value\
>::value,\
       /* one fundamental, one pointer */\

Modified: sandbox/type_traits/boost/type_traits/has_operator_bit_xor_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_bit_xor_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_bit_xor_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -14,13 +14,14 @@
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
    ::boost::type_traits::ice_or<\
- /* two fundamental, one non integral */\
+ /* two fundamental, one non integral or lhs is const*/\
       ::boost::type_traits::ice_and<\
          ::boost::is_fundamental< lhs_nocv >::value,\
          ::boost::is_fundamental< rhs_nocv >::value,\
          ::boost::type_traits::ice_or<\
             ::boost::type_traits::ice_not< ::boost::is_integral< lhs_noref >::value >::value,\
- ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value\
+ ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value,\
+ ::boost::is_const< lhs_noref >::value\
>::value\
>::value,\
       /* one fundamental, one pointer */\

Modified: sandbox/type_traits/boost/type_traits/has_operator_divides_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_divides_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_divides_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -13,8 +13,14 @@
 #define BOOST_TT_TRAIT_OP /=
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
- /* pointer with pointer or fundamental */\
    ::boost::type_traits::ice_or<\
+ /* LHS is fundamental and const, RHS is fundamental */\
+ ::boost::type_traits::ice_and<\
+ ::boost::is_fundamental< lhs_nocv >::value,\
+ ::boost::is_const< lhs_noref >::value,\
+ ::boost::is_fundamental< rhs_nocv >::value\
+ >::value,\
+ /* pointer with pointer or fundamental */\
       ::boost::type_traits::ice_and<\
          ::boost::is_pointer< lhs_noref >::value,\
          ::boost::type_traits::ice_or<\

Modified: sandbox/type_traits/boost/type_traits/has_operator_left_shift_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_left_shift_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_left_shift_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -14,13 +14,14 @@
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
    ::boost::type_traits::ice_or<\
- /* two fundamental, one non integral */\
+ /* two fundamental, one non integral or lhs is const*/\
       ::boost::type_traits::ice_and<\
          ::boost::is_fundamental< lhs_nocv >::value,\
          ::boost::is_fundamental< rhs_nocv >::value,\
          ::boost::type_traits::ice_or<\
             ::boost::type_traits::ice_not< ::boost::is_integral< lhs_noref >::value >::value,\
- ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value\
+ ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value,\
+ ::boost::is_const< lhs_noref >::value\
>::value\
>::value,\
       /* one fundamental, one pointer */\

Modified: sandbox/type_traits/boost/type_traits/has_operator_minus_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_minus_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_minus_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -14,6 +14,12 @@
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
    ::boost::type_traits::ice_or<\
+ /* LHS is fundamental and const, RHS is fundamental */\
+ ::boost::type_traits::ice_and<\
+ ::boost::is_fundamental< lhs_nocv >::value,\
+ ::boost::is_const< lhs_noref >::value,\
+ ::boost::is_fundamental< rhs_nocv >::value\
+ >::value,\
       /* RHS==pointer */\
       ::boost::type_traits::ice_and<\
          ::boost::is_pointer< rhs_noref >::value,\

Modified: sandbox/type_traits/boost/type_traits/has_operator_modulus_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_modulus_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_modulus_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -14,13 +14,14 @@
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
    ::boost::type_traits::ice_or<\
- /* two fundamental, one non integral */\
+ /* two fundamental, one non integral or lhs is const*/\
       ::boost::type_traits::ice_and<\
          ::boost::is_fundamental< lhs_nocv >::value,\
          ::boost::is_fundamental< rhs_nocv >::value,\
          ::boost::type_traits::ice_or<\
             ::boost::type_traits::ice_not< ::boost::is_integral< lhs_noref >::value >::value,\
- ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value\
+ ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value,\
+ ::boost::is_const< lhs_noref >::value\
>::value\
>::value,\
       /* one fundamental, one pointer */\

Modified: sandbox/type_traits/boost/type_traits/has_operator_multiplies_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_multiplies_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_multiplies_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -13,8 +13,14 @@
 #define BOOST_TT_TRAIT_OP *=
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
- /* pointer with pointer or fundamental */\
    ::boost::type_traits::ice_or<\
+ /* LHS is fundamental and const, RHS is fundamental */\
+ ::boost::type_traits::ice_and<\
+ ::boost::is_fundamental< lhs_nocv >::value,\
+ ::boost::is_const< lhs_noref >::value,\
+ ::boost::is_fundamental< rhs_nocv >::value\
+ >::value,\
+ /* pointer with pointer or fundamental */\
       ::boost::type_traits::ice_and<\
          ::boost::is_pointer< lhs_noref >::value,\
          ::boost::type_traits::ice_or<\

Modified: sandbox/type_traits/boost/type_traits/has_operator_plus_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_plus_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_plus_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -14,6 +14,12 @@
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
    ::boost::type_traits::ice_or<\
+ /* LHS is fundamental and const, RHS is fundamental */\
+ ::boost::type_traits::ice_and<\
+ ::boost::is_fundamental< lhs_nocv >::value,\
+ ::boost::is_const< lhs_noref >::value,\
+ ::boost::is_fundamental< rhs_nocv >::value\
+ >::value,\
       /* two pointers */\
       ::boost::type_traits::ice_and<\
          ::boost::is_pointer< lhs_noref >::value,\

Modified: sandbox/type_traits/boost/type_traits/has_operator_right_shift_equal.hpp
==============================================================================
--- sandbox/type_traits/boost/type_traits/has_operator_right_shift_equal.hpp (original)
+++ sandbox/type_traits/boost/type_traits/has_operator_right_shift_equal.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -14,13 +14,14 @@
 #define BOOST_TT_DEFAULT_RET void
 #define BOOST_TT_FORBIDDEN_IF\
    ::boost::type_traits::ice_or<\
- /* two fundamental, one non integral */\
+ /* two fundamental, one non integral or lhs is const*/\
       ::boost::type_traits::ice_and<\
          ::boost::is_fundamental< lhs_nocv >::value,\
          ::boost::is_fundamental< rhs_nocv >::value,\
          ::boost::type_traits::ice_or<\
             ::boost::type_traits::ice_not< ::boost::is_integral< lhs_noref >::value >::value,\
- ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value\
+ ::boost::type_traits::ice_not< ::boost::is_integral< rhs_noref >::value >::value,\
+ ::boost::is_const< lhs_noref >::value\
>::value\
>::value,\
       /* one fundamental, one pointer */\

Modified: sandbox/type_traits/libs/type_traits/test/has_binary_logical_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_binary_logical_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_binary_logical_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -82,26 +82,32 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
 # define CV(T) const T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
@@ -727,7 +733,9 @@
    TEST_TTR(long double, double, tag, false);
    TEST_TTR(long double, long double, tag, false);
 
+# undef CV1
 # define CV1(T) const T
+# undef CV2
 # define CV2(T) T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -751,7 +759,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) volatile T
+# undef CV2
 # define CV2(T) T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -775,7 +785,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) const volatile T
+# undef CV2
 # define CV2(T) T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -799,7 +811,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) const T&
+# undef CV2
 # define CV2(T) T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -823,7 +837,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) volatile T&
+# undef CV2
 # define CV2(T) T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -847,7 +863,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) const volatile T&
+# undef CV2
 # define CV2(T) T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -871,7 +889,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) T
+# undef CV2
 # define CV2(T) const T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -895,7 +915,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) T
+# undef CV2
 # define CV2(T) volatile T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -919,7 +941,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) T
+# undef CV2
 # define CV2(T) const volatile T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -943,7 +967,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) T
+# undef CV2
 # define CV2(T) const T&
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -967,7 +993,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) T
+# undef CV2
 # define CV2(T) volatile T&
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -991,7 +1019,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) T
+# undef CV2
 # define CV2(T) const volatile T&
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -1015,7 +1045,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) const T
+# undef CV2
 # define CV2(T) const T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -1039,7 +1071,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) const T&
+# undef CV2
 # define CV2(T) const T&
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -1063,7 +1097,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) volatile T
+# undef CV2
 # define CV2(T) volatile T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -1087,7 +1123,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) volatile T&
+# undef CV2
 # define CV2(T) volatile T&
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -1111,7 +1149,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) const volatile T
+# undef CV2
 # define CV2(T) const volatile T
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);
@@ -1135,7 +1175,9 @@
    TEST_TTR(CV1(double), CV2(bool), tag, false);
    TEST_TTR(CV1(double), CV2(int), tag, false);
 
+# undef CV1
 # define CV1(T) const volatile T&
+# undef CV2
 # define CV2(T) const volatile T&
    // test with only two template parameters
    TEST_TT(CV1(bool), CV2(int), true);

Modified: sandbox/type_traits/libs/type_traits/test/has_binary_minus_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_binary_minus_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_binary_minus_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -82,6 +82,37 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+
    // test with only two template parameters
    TEST_TT(bool, bool, true);
    TEST_TT(bool, char, true);
@@ -701,6 +732,474 @@
    TEST_TTR(long double, float, tag, false);
    TEST_TTR(long double, double, tag, false);
    TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
 
    TEST_T(without, false);
    TEST_T(internal, true);

Modified: sandbox/type_traits/libs/type_traits/test/has_binary_plus_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_binary_plus_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_binary_plus_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -82,6 +82,37 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+
    // test with only two template parameters
    TEST_TT(bool, bool, true);
    TEST_TT(bool, char, true);
@@ -701,6 +732,474 @@
    TEST_TTR(long double, float, tag, false);
    TEST_TTR(long double, double, tag, false);
    TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
 
    TEST_T(without, false);
    TEST_T(internal, true);

Modified: sandbox/type_traits/libs/type_traits/test/has_comparison_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_comparison_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_comparison_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -82,6 +82,37 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+
    // test with only two template parameters
    TEST_TT(bool, bool, true);
    TEST_TT(bool, char, true);
@@ -701,6 +732,474 @@
    TEST_TTR(long double, float, tag, false);
    TEST_TTR(long double, double, tag, false);
    TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
 
    TEST_T(without, false);
    TEST_T(internal, true);

Added: sandbox/type_traits/libs/type_traits/test/has_integral_no_constlhs_operator_test.hpp
==============================================================================
--- (empty file)
+++ sandbox/type_traits/libs/type_traits/test/has_integral_no_constlhs_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -0,0 +1,1345 @@
+// (C) Copyright Frederic Bron 2009-2010.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <typeinfo>
+#include <string>
+
+// test with one template parameter
+#define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::BOOST_TT_TRAIT_NAME<TYPE>::value), RESULT)
+// test with one template parameter plus return value
+#define TEST_TR(TYPE,RET,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::BOOST_TT_TRAIT_NAME<TYPE,TYPE,RET>::value), RESULT)
+// test with two template parameters
+#define TEST_TT(TYPE1,TYPE2,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::BOOST_TT_TRAIT_NAME<TYPE1,TYPE2>::value), RESULT)
+// test with two template parameters plus return value
+#define TEST_TTR(TYPE1,TYPE2,RET,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::BOOST_TT_TRAIT_NAME<TYPE1,TYPE2,RET>::value), RESULT)
+
+namespace {
+
+struct ret { };
+
+struct without { };
+
+struct internal { ret operator BOOST_TT_TRAIT_OP (const internal&) const; };
+
+struct external { };
+ret operator BOOST_TT_TRAIT_OP (const external&, const external&);
+
+class internal_private { ret operator BOOST_TT_TRAIT_OP (const internal_private&) const; };
+
+struct returns_int { int operator BOOST_TT_TRAIT_OP (const returns_int&); };
+
+struct returns_void { void operator BOOST_TT_TRAIT_OP (const returns_void&); };
+
+struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (const returns_void_star&); };
+
+struct returns_double { double operator BOOST_TT_TRAIT_OP (const returns_double&); };
+
+struct returns_string { std::string operator BOOST_TT_TRAIT_OP (const returns_string&); };
+
+//struct convertible_to_bool { operator bool () const; };
+//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (const returns_convertible_to_bool&); };
+
+class Base1 { };
+class Derived1 : public Base1 { };
+
+bool operator BOOST_TT_TRAIT_OP (const Base1&, const Base1&) { return true; }
+
+class Base2 { };
+struct Derived2 : public Base2 {
+ Derived2(int); // to check if it works with a class that is not default constructible
+};
+
+bool operator BOOST_TT_TRAIT_OP (const Derived2&, const Derived2&) { return true; }
+
+struct tag { };
+
+struct A { };
+struct B : public A { };
+
+struct C { };
+struct D { };
+bool operator BOOST_TT_TRAIT_OP (const C&, void*) { return true; }
+bool operator BOOST_TT_TRAIT_OP (void*, const D&) { return true; }
+bool operator BOOST_TT_TRAIT_OP (const C&, const D&) { return true; }
+
+void run() {
+ // test with only one template parameter
+ TEST_T(bool, true);
+ TEST_T(char, true);
+ TEST_T(signed char, true);
+ TEST_T(short int, true);
+ TEST_T(int, true);
+ TEST_T(long int, true);
+ TEST_T(unsigned char, true);
+ TEST_T(unsigned short int, true);
+ TEST_T(unsigned int, true);
+ TEST_T(unsigned long int, true);
+ TEST_T(wchar_t, true);
+ TEST_T(float, false);
+ TEST_T(double, false);
+ TEST_T(long double, false);
+ TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+
+ // test with only two template parameters
+ TEST_TT(bool, bool, true);
+ TEST_TT(bool, char, true);
+ TEST_TT(bool, signed char, true);
+ TEST_TT(bool, short int, true);
+ TEST_TT(bool, int, true);
+ TEST_TT(bool, long int, true);
+ TEST_TT(bool, unsigned char, true);
+ TEST_TT(bool, unsigned short int, true);
+ TEST_TT(bool, unsigned int, true);
+ TEST_TT(bool, unsigned long int, true);
+ TEST_TT(bool, wchar_t, true);
+ TEST_TT(bool, float, false);
+ TEST_TT(bool, double, false);
+ TEST_TT(bool, long double, false);
+ TEST_TT(char, bool, true);
+ TEST_TT(char, char, true);
+ TEST_TT(char, signed char, true);
+ TEST_TT(char, short int, true);
+ TEST_TT(char, int, true);
+ TEST_TT(char, long int, true);
+ TEST_TT(char, unsigned char, true);
+ TEST_TT(char, unsigned short int, true);
+ TEST_TT(char, unsigned int, true);
+ TEST_TT(char, unsigned long int, true);
+ TEST_TT(char, wchar_t, true);
+ TEST_TT(char, float, false);
+ TEST_TT(char, double, false);
+ TEST_TT(char, long double, false);
+ TEST_TT(signed char, bool, true);
+ TEST_TT(signed char, char, true);
+ TEST_TT(signed char, signed char, true);
+ TEST_TT(signed char, short int, true);
+ TEST_TT(signed char, int, true);
+ TEST_TT(signed char, long int, true);
+ TEST_TT(signed char, unsigned char, true);
+ TEST_TT(signed char, unsigned short int, true);
+ TEST_TT(signed char, unsigned int, true);
+ TEST_TT(signed char, unsigned long int, true);
+ TEST_TT(signed char, wchar_t, true);
+ TEST_TT(signed char, float, false);
+ TEST_TT(signed char, double, false);
+ TEST_TT(signed char, long double, false);
+ TEST_TT(short int, bool, true);
+ TEST_TT(short int, char, true);
+ TEST_TT(short int, signed char, true);
+ TEST_TT(short int, short int, true);
+ TEST_TT(short int, int, true);
+ TEST_TT(short int, long int, true);
+ TEST_TT(short int, unsigned char, true);
+ TEST_TT(short int, unsigned short int, true);
+ TEST_TT(short int, unsigned int, true);
+ TEST_TT(short int, unsigned long int, true);
+ TEST_TT(short int, wchar_t, true);
+ TEST_TT(short int, float, false);
+ TEST_TT(short int, double, false);
+ TEST_TT(short int, long double, false);
+ TEST_TT(int, bool, true);
+ TEST_TT(int, char, true);
+ TEST_TT(int, signed char, true);
+ TEST_TT(int, short int, true);
+ TEST_TT(int, int, true);
+ TEST_TT(int, long int, true);
+ TEST_TT(int, unsigned char, true);
+ TEST_TT(int, unsigned short int, true);
+ TEST_TT(int, unsigned int, true);
+ TEST_TT(int, unsigned long int, true);
+ TEST_TT(int, wchar_t, true);
+ TEST_TT(int, float, false);
+ TEST_TT(int, double, false);
+ TEST_TT(int, long double, false);
+ TEST_TT(long int, bool, true);
+ TEST_TT(long int, char, true);
+ TEST_TT(long int, signed char, true);
+ TEST_TT(long int, short int, true);
+ TEST_TT(long int, int, true);
+ TEST_TT(long int, long int, true);
+ TEST_TT(long int, unsigned char, true);
+ TEST_TT(long int, unsigned short int, true);
+ TEST_TT(long int, unsigned int, true);
+ TEST_TT(long int, unsigned long int, true);
+ TEST_TT(long int, wchar_t, true);
+ TEST_TT(long int, float, false);
+ TEST_TT(long int, double, false);
+ TEST_TT(long int, long double, false);
+ TEST_TT(unsigned char, bool, true);
+ TEST_TT(unsigned char, char, true);
+ TEST_TT(unsigned char, signed char, true);
+ TEST_TT(unsigned char, short int, true);
+ TEST_TT(unsigned char, int, true);
+ TEST_TT(unsigned char, long int, true);
+ TEST_TT(unsigned char, unsigned char, true);
+ TEST_TT(unsigned char, unsigned short int, true);
+ TEST_TT(unsigned char, unsigned int, true);
+ TEST_TT(unsigned char, unsigned long int, true);
+ TEST_TT(unsigned char, wchar_t, true);
+ TEST_TT(unsigned char, float, false);
+ TEST_TT(unsigned char, double, false);
+ TEST_TT(unsigned char, long double, false);
+ TEST_TT(unsigned short int, bool, true);
+ TEST_TT(unsigned short int, char, true);
+ TEST_TT(unsigned short int, signed char, true);
+ TEST_TT(unsigned short int, short int, true);
+ TEST_TT(unsigned short int, int, true);
+ TEST_TT(unsigned short int, long int, true);
+ TEST_TT(unsigned short int, unsigned char, true);
+ TEST_TT(unsigned short int, unsigned short int, true);
+ TEST_TT(unsigned short int, unsigned int, true);
+ TEST_TT(unsigned short int, unsigned long int, true);
+ TEST_TT(unsigned short int, wchar_t, true);
+ TEST_TT(unsigned short int, float, false);
+ TEST_TT(unsigned short int, double, false);
+ TEST_TT(unsigned short int, long double, false);
+ TEST_TT(unsigned int, bool, true);
+ TEST_TT(unsigned int, char, true);
+ TEST_TT(unsigned int, signed char, true);
+ TEST_TT(unsigned int, short int, true);
+ TEST_TT(unsigned int, int, true);
+ TEST_TT(unsigned int, long int, true);
+ TEST_TT(unsigned int, unsigned char, true);
+ TEST_TT(unsigned int, unsigned short int, true);
+ TEST_TT(unsigned int, unsigned int, true);
+ TEST_TT(unsigned int, unsigned long int, true);
+ TEST_TT(unsigned int, wchar_t, true);
+ TEST_TT(unsigned int, float, false);
+ TEST_TT(unsigned int, double, false);
+ TEST_TT(unsigned int, long double, false);
+ TEST_TT(unsigned long int, bool, true);
+ TEST_TT(unsigned long int, char, true);
+ TEST_TT(unsigned long int, signed char, true);
+ TEST_TT(unsigned long int, short int, true);
+ TEST_TT(unsigned long int, int, true);
+ TEST_TT(unsigned long int, long int, true);
+ TEST_TT(unsigned long int, unsigned char, true);
+ TEST_TT(unsigned long int, unsigned short int, true);
+ TEST_TT(unsigned long int, unsigned int, true);
+ TEST_TT(unsigned long int, unsigned long int, true);
+ TEST_TT(unsigned long int, wchar_t, true);
+ TEST_TT(unsigned long int, float, false);
+ TEST_TT(unsigned long int, double, false);
+ TEST_TT(unsigned long int, long double, false);
+ TEST_TT(wchar_t, bool, true);
+ TEST_TT(wchar_t, char, true);
+ TEST_TT(wchar_t, signed char, true);
+ TEST_TT(wchar_t, short int, true);
+ TEST_TT(wchar_t, int, true);
+ TEST_TT(wchar_t, long int, true);
+ TEST_TT(wchar_t, unsigned char, true);
+ TEST_TT(wchar_t, unsigned short int, true);
+ TEST_TT(wchar_t, unsigned int, true);
+ TEST_TT(wchar_t, unsigned long int, true);
+ TEST_TT(wchar_t, wchar_t, true);
+ TEST_TT(wchar_t, float, false);
+ TEST_TT(wchar_t, double, false);
+ TEST_TT(wchar_t, long double, false);
+ TEST_TT(float, bool, false);
+ TEST_TT(float, char, false);
+ TEST_TT(float, signed char, false);
+ TEST_TT(float, short int, false);
+ TEST_TT(float, int, false);
+ TEST_TT(float, long int, false);
+ TEST_TT(float, unsigned char, false);
+ TEST_TT(float, unsigned short int, false);
+ TEST_TT(float, unsigned int, false);
+ TEST_TT(float, unsigned long int, false);
+ TEST_TT(float, wchar_t, false);
+ TEST_TT(float, float, false);
+ TEST_TT(float, double, false);
+ TEST_TT(float, long double, false);
+ TEST_TT(double, bool, false);
+ TEST_TT(double, char, false);
+ TEST_TT(double, signed char, false);
+ TEST_TT(double, short int, false);
+ TEST_TT(double, int, false);
+ TEST_TT(double, long int, false);
+ TEST_TT(double, unsigned char, false);
+ TEST_TT(double, unsigned short int, false);
+ TEST_TT(double, unsigned int, false);
+ TEST_TT(double, unsigned long int, false);
+ TEST_TT(double, wchar_t, false);
+ TEST_TT(double, float, false);
+ TEST_TT(double, double, false);
+ TEST_TT(double, long double, false);
+ TEST_TT(long double, bool, false);
+ TEST_TT(long double, char, false);
+ TEST_TT(long double, signed char, false);
+ TEST_TT(long double, short int, false);
+ TEST_TT(long double, int, false);
+ TEST_TT(long double, long int, false);
+ TEST_TT(long double, unsigned char, false);
+ TEST_TT(long double, unsigned short int, false);
+ TEST_TT(long double, unsigned int, false);
+ TEST_TT(long double, unsigned long int, false);
+ TEST_TT(long double, wchar_t, false);
+ TEST_TT(long double, float, false);
+ TEST_TT(long double, double, false);
+ TEST_TT(long double, long double, false);
+ TEST_TT(bool, void, false);
+ TEST_TT(void, bool, false);
+ TEST_TT(char, void, false);
+ TEST_TT(void, char, false);
+ TEST_TT(signed char, void, false);
+ TEST_TT(void, signed char, false);
+ TEST_TT(short int, void, false);
+ TEST_TT(void, short int, false);
+ TEST_TT(int, void, false);
+ TEST_TT(void, int, false);
+ TEST_TT(long int, void, false);
+ TEST_TT(void, long int, false);
+ TEST_TT(unsigned char, void, false);
+ TEST_TT(void, unsigned char, false);
+ TEST_TT(unsigned short int, void, false);
+ TEST_TT(void, unsigned short int, false);
+ TEST_TT(unsigned int, void, false);
+ TEST_TT(void, unsigned int, false);
+ TEST_TT(unsigned long int, void, false);
+ TEST_TT(void, unsigned long int, false);
+ TEST_TT(wchar_t, void, false);
+ TEST_TT(void, wchar_t, false);
+ TEST_TT(float, void, false);
+ TEST_TT(void, float, false);
+ TEST_TT(double, void, false);
+ TEST_TT(void, double, false);
+ TEST_TT(long double, void, false);
+ TEST_TT(void, long double, false);
+
+// test with three template parameters
+ TEST_TTR(bool, bool, bool, true);
+ TEST_TTR(bool, char, bool, true);
+ TEST_TTR(bool, signed char, bool, true);
+ TEST_TTR(bool, short int, bool, true);
+ TEST_TTR(bool, int, bool, true);
+ TEST_TTR(bool, long int, bool, true);
+ TEST_TTR(bool, unsigned char, bool, true);
+ TEST_TTR(bool, unsigned short int, bool, true);
+ TEST_TTR(bool, unsigned int, bool, true);
+ TEST_TTR(bool, unsigned long int, bool, true);
+ TEST_TTR(bool, wchar_t, bool, true);
+ TEST_TTR(bool, float, bool, false);
+ TEST_TTR(bool, double, bool, false);
+ TEST_TTR(bool, long double, bool, false);
+ TEST_TTR(char, bool, bool, true);
+ TEST_TTR(char, char, bool, true);
+ TEST_TTR(char, signed char, bool, true);
+ TEST_TTR(char, short int, bool, true);
+ TEST_TTR(char, int, bool, true);
+ TEST_TTR(char, long int, bool, true);
+ TEST_TTR(char, unsigned char, bool, true);
+ TEST_TTR(char, unsigned short int, bool, true);
+ TEST_TTR(char, unsigned int, bool, true);
+ TEST_TTR(char, unsigned long int, bool, true);
+ TEST_TTR(char, wchar_t, bool, true);
+ TEST_TTR(char, float, bool, false);
+ TEST_TTR(char, double, bool, false);
+ TEST_TTR(char, long double, bool, false);
+ TEST_TTR(signed char, bool, bool, true);
+ TEST_TTR(signed char, char, bool, true);
+ TEST_TTR(signed char, signed char, bool, true);
+ TEST_TTR(signed char, short int, bool, true);
+ TEST_TTR(signed char, int, bool, true);
+ TEST_TTR(signed char, long int, bool, true);
+ TEST_TTR(signed char, unsigned char, bool, true);
+ TEST_TTR(signed char, unsigned short int, bool, true);
+ TEST_TTR(signed char, unsigned int, bool, true);
+ TEST_TTR(signed char, unsigned long int, bool, true);
+ TEST_TTR(signed char, wchar_t, bool, true);
+ TEST_TTR(signed char, float, bool, false);
+ TEST_TTR(signed char, double, bool, false);
+ TEST_TTR(signed char, long double, bool, false);
+ TEST_TTR(short int, bool, bool, true);
+ TEST_TTR(short int, char, bool, true);
+ TEST_TTR(short int, signed char, bool, true);
+ TEST_TTR(short int, short int, bool, true);
+ TEST_TTR(short int, int, bool, true);
+ TEST_TTR(short int, long int, bool, true);
+ TEST_TTR(short int, unsigned char, bool, true);
+ TEST_TTR(short int, unsigned short int, bool, true);
+ TEST_TTR(short int, unsigned int, bool, true);
+ TEST_TTR(short int, unsigned long int, bool, true);
+ TEST_TTR(short int, wchar_t, bool, true);
+ TEST_TTR(short int, float, bool, false);
+ TEST_TTR(short int, double, bool, false);
+ TEST_TTR(short int, long double, bool, false);
+ TEST_TTR(int, bool, bool, true);
+ TEST_TTR(int, char, bool, true);
+ TEST_TTR(int, signed char, bool, true);
+ TEST_TTR(int, short int, bool, true);
+ TEST_TTR(int, int, bool, true);
+ TEST_TTR(int, long int, bool, true);
+ TEST_TTR(int, unsigned char, bool, true);
+ TEST_TTR(int, unsigned short int, bool, true);
+ TEST_TTR(int, unsigned int, bool, true);
+ TEST_TTR(int, unsigned long int, bool, true);
+ TEST_TTR(int, wchar_t, bool, true);
+ TEST_TTR(int, float, bool, false);
+ TEST_TTR(int, double, bool, false);
+ TEST_TTR(int, long double, bool, false);
+ TEST_TTR(long int, bool, bool, true);
+ TEST_TTR(long int, char, bool, true);
+ TEST_TTR(long int, signed char, bool, true);
+ TEST_TTR(long int, short int, bool, true);
+ TEST_TTR(long int, int, bool, true);
+ TEST_TTR(long int, long int, bool, true);
+ TEST_TTR(long int, unsigned char, bool, true);
+ TEST_TTR(long int, unsigned short int, bool, true);
+ TEST_TTR(long int, unsigned int, bool, true);
+ TEST_TTR(long int, unsigned long int, bool, true);
+ TEST_TTR(long int, wchar_t, bool, true);
+ TEST_TTR(long int, float, bool, false);
+ TEST_TTR(long int, double, bool, false);
+ TEST_TTR(long int, long double, bool, false);
+ TEST_TTR(unsigned char, bool, bool, true);
+ TEST_TTR(unsigned char, char, bool, true);
+ TEST_TTR(unsigned char, signed char, bool, true);
+ TEST_TTR(unsigned char, short int, bool, true);
+ TEST_TTR(unsigned char, int, bool, true);
+ TEST_TTR(unsigned char, long int, bool, true);
+ TEST_TTR(unsigned char, unsigned char, bool, true);
+ TEST_TTR(unsigned char, unsigned short int, bool, true);
+ TEST_TTR(unsigned char, unsigned int, bool, true);
+ TEST_TTR(unsigned char, unsigned long int, bool, true);
+ TEST_TTR(unsigned char, wchar_t, bool, true);
+ TEST_TTR(unsigned char, float, bool, false);
+ TEST_TTR(unsigned char, double, bool, false);
+ TEST_TTR(unsigned char, long double, bool, false);
+ TEST_TTR(unsigned short int, bool, bool, true);
+ TEST_TTR(unsigned short int, char, bool, true);
+ TEST_TTR(unsigned short int, signed char, bool, true);
+ TEST_TTR(unsigned short int, short int, bool, true);
+ TEST_TTR(unsigned short int, int, bool, true);
+ TEST_TTR(unsigned short int, long int, bool, true);
+ TEST_TTR(unsigned short int, unsigned char, bool, true);
+ TEST_TTR(unsigned short int, unsigned short int, bool, true);
+ TEST_TTR(unsigned short int, unsigned int, bool, true);
+ TEST_TTR(unsigned short int, unsigned long int, bool, true);
+ TEST_TTR(unsigned short int, wchar_t, bool, true);
+ TEST_TTR(unsigned short int, float, bool, false);
+ TEST_TTR(unsigned short int, double, bool, false);
+ TEST_TTR(unsigned short int, long double, bool, false);
+ TEST_TTR(unsigned int, bool, bool, true);
+ TEST_TTR(unsigned int, char, bool, true);
+ TEST_TTR(unsigned int, signed char, bool, true);
+ TEST_TTR(unsigned int, short int, bool, true);
+ TEST_TTR(unsigned int, int, bool, true);
+ TEST_TTR(unsigned int, long int, bool, true);
+ TEST_TTR(unsigned int, unsigned char, bool, true);
+ TEST_TTR(unsigned int, unsigned short int, bool, true);
+ TEST_TTR(unsigned int, unsigned int, bool, true);
+ TEST_TTR(unsigned int, unsigned long int, bool, true);
+ TEST_TTR(unsigned int, wchar_t, bool, true);
+ TEST_TTR(unsigned int, float, bool, false);
+ TEST_TTR(unsigned int, double, bool, false);
+ TEST_TTR(unsigned int, long double, bool, false);
+ TEST_TTR(unsigned long int, bool, bool, true);
+ TEST_TTR(unsigned long int, char, bool, true);
+ TEST_TTR(unsigned long int, signed char, bool, true);
+ TEST_TTR(unsigned long int, short int, bool, true);
+ TEST_TTR(unsigned long int, int, bool, true);
+ TEST_TTR(unsigned long int, long int, bool, true);
+ TEST_TTR(unsigned long int, unsigned char, bool, true);
+ TEST_TTR(unsigned long int, unsigned short int, bool, true);
+ TEST_TTR(unsigned long int, unsigned int, bool, true);
+ TEST_TTR(unsigned long int, unsigned long int, bool, true);
+ TEST_TTR(unsigned long int, wchar_t, bool, true);
+ TEST_TTR(unsigned long int, float, bool, false);
+ TEST_TTR(unsigned long int, double, bool, false);
+ TEST_TTR(unsigned long int, long double, bool, false);
+ TEST_TTR(wchar_t, bool, bool, true);
+ TEST_TTR(wchar_t, char, bool, true);
+ TEST_TTR(wchar_t, signed char, bool, true);
+ TEST_TTR(wchar_t, short int, bool, true);
+ TEST_TTR(wchar_t, int, bool, true);
+ TEST_TTR(wchar_t, long int, bool, true);
+ TEST_TTR(wchar_t, unsigned char, bool, true);
+ TEST_TTR(wchar_t, unsigned short int, bool, true);
+ TEST_TTR(wchar_t, unsigned int, bool, true);
+ TEST_TTR(wchar_t, unsigned long int, bool, true);
+ TEST_TTR(wchar_t, wchar_t, bool, true);
+ TEST_TTR(wchar_t, float, bool, false);
+ TEST_TTR(wchar_t, double, bool, false);
+ TEST_TTR(wchar_t, long double, bool, false);
+ TEST_TTR(float, bool, bool, false);
+ TEST_TTR(float, char, bool, false);
+ TEST_TTR(float, signed char, bool, false);
+ TEST_TTR(float, short int, bool, false);
+ TEST_TTR(float, int, bool, false);
+ TEST_TTR(float, long int, bool, false);
+ TEST_TTR(float, unsigned char, bool, false);
+ TEST_TTR(float, unsigned short int, bool, false);
+ TEST_TTR(float, unsigned int, bool, false);
+ TEST_TTR(float, unsigned long int, bool, false);
+ TEST_TTR(float, wchar_t, bool, false);
+ TEST_TTR(float, float, bool, false);
+ TEST_TTR(float, double, bool, false);
+ TEST_TTR(float, long double, bool, false);
+ TEST_TTR(double, bool, bool, false);
+ TEST_TTR(double, char, bool, false);
+ TEST_TTR(double, signed char, bool, false);
+ TEST_TTR(double, short int, bool, false);
+ TEST_TTR(double, int, bool, false);
+ TEST_TTR(double, long int, bool, false);
+ TEST_TTR(double, unsigned char, bool, false);
+ TEST_TTR(double, unsigned short int, bool, false);
+ TEST_TTR(double, unsigned int, bool, false);
+ TEST_TTR(double, unsigned long int, bool, false);
+ TEST_TTR(double, wchar_t, bool, false);
+ TEST_TTR(double, float, bool, false);
+ TEST_TTR(double, double, bool, false);
+ TEST_TTR(double, long double, bool, false);
+ TEST_TTR(long double, bool, bool, false);
+ TEST_TTR(long double, char, bool, false);
+ TEST_TTR(long double, signed char, bool, false);
+ TEST_TTR(long double, short int, bool, false);
+ TEST_TTR(long double, int, bool, false);
+ TEST_TTR(long double, long int, bool, false);
+ TEST_TTR(long double, unsigned char, bool, false);
+ TEST_TTR(long double, unsigned short int, bool, false);
+ TEST_TTR(long double, unsigned int, bool, false);
+ TEST_TTR(long double, unsigned long int, bool, false);
+ TEST_TTR(long double, wchar_t, bool, false);
+ TEST_TTR(long double, float, bool, false);
+ TEST_TTR(long double, double, bool, false);
+ TEST_TTR(long double, long double, bool, false);
+ TEST_TTR(bool, bool, tag, false);
+ TEST_TTR(bool, char, tag, false);
+ TEST_TTR(bool, signed char, tag, false);
+ TEST_TTR(bool, short int, tag, false);
+ TEST_TTR(bool, int, tag, false);
+ TEST_TTR(bool, long int, tag, false);
+ TEST_TTR(bool, unsigned char, tag, false);
+ TEST_TTR(bool, unsigned short int, tag, false);
+ TEST_TTR(bool, unsigned int, tag, false);
+ TEST_TTR(bool, unsigned long int, tag, false);
+ TEST_TTR(bool, wchar_t, tag, false);
+ TEST_TTR(bool, float, tag, false);
+ TEST_TTR(bool, double, tag, false);
+ TEST_TTR(bool, long double, tag, false);
+ TEST_TTR(char, bool, tag, false);
+ TEST_TTR(char, char, tag, false);
+ TEST_TTR(char, signed char, tag, false);
+ TEST_TTR(char, short int, tag, false);
+ TEST_TTR(char, int, tag, false);
+ TEST_TTR(char, long int, tag, false);
+ TEST_TTR(char, unsigned char, tag, false);
+ TEST_TTR(char, unsigned short int, tag, false);
+ TEST_TTR(char, unsigned int, tag, false);
+ TEST_TTR(char, unsigned long int, tag, false);
+ TEST_TTR(char, wchar_t, tag, false);
+ TEST_TTR(char, float, tag, false);
+ TEST_TTR(char, double, tag, false);
+ TEST_TTR(char, long double, tag, false);
+ TEST_TTR(signed char, bool, tag, false);
+ TEST_TTR(signed char, char, tag, false);
+ TEST_TTR(signed char, signed char, tag, false);
+ TEST_TTR(signed char, short int, tag, false);
+ TEST_TTR(signed char, int, tag, false);
+ TEST_TTR(signed char, long int, tag, false);
+ TEST_TTR(signed char, unsigned char, tag, false);
+ TEST_TTR(signed char, unsigned short int, tag, false);
+ TEST_TTR(signed char, unsigned int, tag, false);
+ TEST_TTR(signed char, unsigned long int, tag, false);
+ TEST_TTR(signed char, wchar_t, tag, false);
+ TEST_TTR(signed char, float, tag, false);
+ TEST_TTR(signed char, double, tag, false);
+ TEST_TTR(signed char, long double, tag, false);
+ TEST_TTR(short int, bool, tag, false);
+ TEST_TTR(short int, char, tag, false);
+ TEST_TTR(short int, signed char, tag, false);
+ TEST_TTR(short int, short int, tag, false);
+ TEST_TTR(short int, int, tag, false);
+ TEST_TTR(short int, long int, tag, false);
+ TEST_TTR(short int, unsigned char, tag, false);
+ TEST_TTR(short int, unsigned short int, tag, false);
+ TEST_TTR(short int, unsigned int, tag, false);
+ TEST_TTR(short int, unsigned long int, tag, false);
+ TEST_TTR(short int, wchar_t, tag, false);
+ TEST_TTR(short int, float, tag, false);
+ TEST_TTR(short int, double, tag, false);
+ TEST_TTR(short int, long double, tag, false);
+ TEST_TTR(int, bool, tag, false);
+ TEST_TTR(int, char, tag, false);
+ TEST_TTR(int, signed char, tag, false);
+ TEST_TTR(int, short int, tag, false);
+ TEST_TTR(int, int, tag, false);
+ TEST_TTR(int, long int, tag, false);
+ TEST_TTR(int, unsigned char, tag, false);
+ TEST_TTR(int, unsigned short int, tag, false);
+ TEST_TTR(int, unsigned int, tag, false);
+ TEST_TTR(int, unsigned long int, tag, false);
+ TEST_TTR(int, wchar_t, tag, false);
+ TEST_TTR(int, float, tag, false);
+ TEST_TTR(int, double, tag, false);
+ TEST_TTR(int, long double, tag, false);
+ TEST_TTR(long int, bool, tag, false);
+ TEST_TTR(long int, char, tag, false);
+ TEST_TTR(long int, signed char, tag, false);
+ TEST_TTR(long int, short int, tag, false);
+ TEST_TTR(long int, int, tag, false);
+ TEST_TTR(long int, long int, tag, false);
+ TEST_TTR(long int, unsigned char, tag, false);
+ TEST_TTR(long int, unsigned short int, tag, false);
+ TEST_TTR(long int, unsigned int, tag, false);
+ TEST_TTR(long int, unsigned long int, tag, false);
+ TEST_TTR(long int, wchar_t, tag, false);
+ TEST_TTR(long int, float, tag, false);
+ TEST_TTR(long int, double, tag, false);
+ TEST_TTR(long int, long double, tag, false);
+ TEST_TTR(unsigned char, bool, tag, false);
+ TEST_TTR(unsigned char, char, tag, false);
+ TEST_TTR(unsigned char, signed char, tag, false);
+ TEST_TTR(unsigned char, short int, tag, false);
+ TEST_TTR(unsigned char, int, tag, false);
+ TEST_TTR(unsigned char, long int, tag, false);
+ TEST_TTR(unsigned char, unsigned char, tag, false);
+ TEST_TTR(unsigned char, unsigned short int, tag, false);
+ TEST_TTR(unsigned char, unsigned int, tag, false);
+ TEST_TTR(unsigned char, unsigned long int, tag, false);
+ TEST_TTR(unsigned char, wchar_t, tag, false);
+ TEST_TTR(unsigned char, float, tag, false);
+ TEST_TTR(unsigned char, double, tag, false);
+ TEST_TTR(unsigned char, long double, tag, false);
+ TEST_TTR(unsigned short int, bool, tag, false);
+ TEST_TTR(unsigned short int, char, tag, false);
+ TEST_TTR(unsigned short int, signed char, tag, false);
+ TEST_TTR(unsigned short int, short int, tag, false);
+ TEST_TTR(unsigned short int, int, tag, false);
+ TEST_TTR(unsigned short int, long int, tag, false);
+ TEST_TTR(unsigned short int, unsigned char, tag, false);
+ TEST_TTR(unsigned short int, unsigned short int, tag, false);
+ TEST_TTR(unsigned short int, unsigned int, tag, false);
+ TEST_TTR(unsigned short int, unsigned long int, tag, false);
+ TEST_TTR(unsigned short int, wchar_t, tag, false);
+ TEST_TTR(unsigned short int, float, tag, false);
+ TEST_TTR(unsigned short int, double, tag, false);
+ TEST_TTR(unsigned short int, long double, tag, false);
+ TEST_TTR(unsigned int, bool, tag, false);
+ TEST_TTR(unsigned int, char, tag, false);
+ TEST_TTR(unsigned int, signed char, tag, false);
+ TEST_TTR(unsigned int, short int, tag, false);
+ TEST_TTR(unsigned int, int, tag, false);
+ TEST_TTR(unsigned int, long int, tag, false);
+ TEST_TTR(unsigned int, unsigned char, tag, false);
+ TEST_TTR(unsigned int, unsigned short int, tag, false);
+ TEST_TTR(unsigned int, unsigned int, tag, false);
+ TEST_TTR(unsigned int, unsigned long int, tag, false);
+ TEST_TTR(unsigned int, wchar_t, tag, false);
+ TEST_TTR(unsigned int, float, tag, false);
+ TEST_TTR(unsigned int, double, tag, false);
+ TEST_TTR(unsigned int, long double, tag, false);
+ TEST_TTR(unsigned long int, bool, tag, false);
+ TEST_TTR(unsigned long int, char, tag, false);
+ TEST_TTR(unsigned long int, signed char, tag, false);
+ TEST_TTR(unsigned long int, short int, tag, false);
+ TEST_TTR(unsigned long int, int, tag, false);
+ TEST_TTR(unsigned long int, long int, tag, false);
+ TEST_TTR(unsigned long int, unsigned char, tag, false);
+ TEST_TTR(unsigned long int, unsigned short int, tag, false);
+ TEST_TTR(unsigned long int, unsigned int, tag, false);
+ TEST_TTR(unsigned long int, unsigned long int, tag, false);
+ TEST_TTR(unsigned long int, wchar_t, tag, false);
+ TEST_TTR(unsigned long int, float, tag, false);
+ TEST_TTR(unsigned long int, double, tag, false);
+ TEST_TTR(unsigned long int, long double, tag, false);
+ TEST_TTR(wchar_t, bool, tag, false);
+ TEST_TTR(wchar_t, char, tag, false);
+ TEST_TTR(wchar_t, signed char, tag, false);
+ TEST_TTR(wchar_t, short int, tag, false);
+ TEST_TTR(wchar_t, int, tag, false);
+ TEST_TTR(wchar_t, long int, tag, false);
+ TEST_TTR(wchar_t, unsigned char, tag, false);
+ TEST_TTR(wchar_t, unsigned short int, tag, false);
+ TEST_TTR(wchar_t, unsigned int, tag, false);
+ TEST_TTR(wchar_t, unsigned long int, tag, false);
+ TEST_TTR(wchar_t, wchar_t, tag, false);
+ TEST_TTR(wchar_t, float, tag, false);
+ TEST_TTR(wchar_t, double, tag, false);
+ TEST_TTR(wchar_t, long double, tag, false);
+ TEST_TTR(float, bool, tag, false);
+ TEST_TTR(float, char, tag, false);
+ TEST_TTR(float, signed char, tag, false);
+ TEST_TTR(float, short int, tag, false);
+ TEST_TTR(float, int, tag, false);
+ TEST_TTR(float, long int, tag, false);
+ TEST_TTR(float, unsigned char, tag, false);
+ TEST_TTR(float, unsigned short int, tag, false);
+ TEST_TTR(float, unsigned int, tag, false);
+ TEST_TTR(float, unsigned long int, tag, false);
+ TEST_TTR(float, wchar_t, tag, false);
+ TEST_TTR(float, float, tag, false);
+ TEST_TTR(float, double, tag, false);
+ TEST_TTR(float, long double, tag, false);
+ TEST_TTR(double, bool, tag, false);
+ TEST_TTR(double, char, tag, false);
+ TEST_TTR(double, signed char, tag, false);
+ TEST_TTR(double, short int, tag, false);
+ TEST_TTR(double, int, tag, false);
+ TEST_TTR(double, long int, tag, false);
+ TEST_TTR(double, unsigned char, tag, false);
+ TEST_TTR(double, unsigned short int, tag, false);
+ TEST_TTR(double, unsigned int, tag, false);
+ TEST_TTR(double, unsigned long int, tag, false);
+ TEST_TTR(double, wchar_t, tag, false);
+ TEST_TTR(double, float, tag, false);
+ TEST_TTR(double, double, tag, false);
+ TEST_TTR(double, long double, tag, false);
+ TEST_TTR(long double, bool, tag, false);
+ TEST_TTR(long double, char, tag, false);
+ TEST_TTR(long double, signed char, tag, false);
+ TEST_TTR(long double, short int, tag, false);
+ TEST_TTR(long double, int, tag, false);
+ TEST_TTR(long double, long int, tag, false);
+ TEST_TTR(long double, unsigned char, tag, false);
+ TEST_TTR(long double, unsigned short int, tag, false);
+ TEST_TTR(long double, unsigned int, tag, false);
+ TEST_TTR(long double, unsigned long int, tag, false);
+ TEST_TTR(long double, wchar_t, tag, false);
+ TEST_TTR(long double, float, tag, false);
+ TEST_TTR(long double, double, tag, false);
+ TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+ TEST_T(without, false);
+ TEST_T(internal, true);
+ TEST_T(external, true);
+// compile time error
+// TEST_T(internal_private, false);
+ TEST_T(returns_int, true);
+ TEST_T(returns_void, true);
+ TEST_T(returns_void_star, true);
+ TEST_T(returns_double, true);
+ TEST_T(returns_string, true);
+// TEST_T(convertible_to_bool, true);
+ TEST_T(Base1, true);
+ TEST_T(Derived1, true);
+ TEST_T(Base2, false);
+ TEST_T(Derived2, true);
+
+ TEST_TR(without, bool, false);
+ TEST_TR(internal, bool, false);
+ TEST_TR(internal, ret, true);
+ TEST_TR(external, bool, false);
+ TEST_TR(external, ret, true);
+ TEST_TR(returns_int, bool, true);
+ TEST_TR(returns_int, int, true);
+ TEST_TR(returns_void, void, true);
+ TEST_TR(returns_void, bool, false);
+ TEST_TR(returns_void_star, bool, true);
+ TEST_TR(returns_double, bool, true);
+ TEST_TR(returns_double, double, true);
+ TEST_TR(returns_string, bool, false);
+ TEST_TR(returns_string, std::string, true);
+// TEST_TR(convertible_to_bool, bool, true);
+ TEST_TR(Base1, bool, true);
+ TEST_TR(Derived1, bool, true);
+ TEST_TR(Base2, bool, false);
+ TEST_TR(Derived2, bool, true);
+ // pointers
+ TEST_TT(void*, bool, false);
+ TEST_TT(void*, int, false);
+ TEST_TT(void*, double, false);
+ TEST_TT(void*, A, false);
+ TEST_TT(void*, B, false);
+ TEST_TT(bool*, bool, false);
+ TEST_TT(bool*, int, false);
+ TEST_TT(bool*, double, false);
+ TEST_TT(bool*, A, false);
+ TEST_TT(bool*, B, false);
+ TEST_TT(int*, bool, false);
+ TEST_TT(int*, int, false);
+ TEST_TT(int*, double, false);
+ TEST_TT(int*, A, false);
+ TEST_TT(int*, B, false);
+ TEST_TT(double*, bool, false);
+ TEST_TT(double*, int, false);
+ TEST_TT(double*, double, false);
+ TEST_TT(double*, A, false);
+ TEST_TT(double*, B, false);
+ TEST_TT(A*, bool, false);
+ TEST_TT(A*, int, false);
+ TEST_TT(A*, double, false);
+ TEST_TT(A*, A, false);
+ TEST_TT(A*, B, false);
+ TEST_TT(B*, bool, false);
+ TEST_TT(B*, int, false);
+ TEST_TT(B*, double, false);
+ TEST_TT(B*, A, false);
+ TEST_TT(B*, B, false);
+ TEST_TT(bool, void*, false);
+ TEST_TT(bool, bool*, false);
+ TEST_TT(bool, int*, false);
+ TEST_TT(bool, double*, false);
+ TEST_TT(bool, A*, false);
+ TEST_TT(bool, B*, false);
+ TEST_TT(int, void*, false);
+ TEST_TT(int, bool*, false);
+ TEST_TT(int, int*, false);
+ TEST_TT(int, double*, false);
+ TEST_TT(int, A*, false);
+ TEST_TT(int, B*, false);
+ TEST_TT(double, void*, false);
+ TEST_TT(double, bool*, false);
+ TEST_TT(double, int*, false);
+ TEST_TT(double, double*, false);
+ TEST_TT(double, A*, false);
+ TEST_TT(double, B*, false);
+ TEST_TT(A, void*, false);
+ TEST_TT(A, bool*, false);
+ TEST_TT(A, int*, false);
+ TEST_TT(A, double*, false);
+ TEST_TT(A, A*, false);
+ TEST_TT(A, B*, false);
+ TEST_TT(B, void*, false);
+ TEST_TT(B, bool*, false);
+ TEST_TT(B, int*, false);
+ TEST_TT(B, double*, false);
+ TEST_TT(B, A*, false);
+ TEST_TT(B, B*, false);
+ TEST_TT(void*, void*, false);
+ TEST_TT(void*, bool*, false);
+ TEST_TT(void*, int*, false);
+ TEST_TT(void*, double*, false);
+ TEST_TT(void*, A*, false);
+ TEST_TT(void*, B*, false);
+ TEST_TT(bool*, void*, false);
+ TEST_TT(bool*, bool*, false);
+ TEST_TT(bool*, int*, false);
+ TEST_TT(bool*, double*, false);
+ TEST_TT(bool*, A*, false);
+ TEST_TT(bool*, B*, false);
+ TEST_TT(int*, void*, false);
+ TEST_TT(int*, bool*, false);
+ TEST_TT(int*, int*, false);
+ TEST_TT(int*, double*, false);
+ TEST_TT(int*, A*, false);
+ TEST_TT(int*, B*, false);
+ TEST_TT(double*, void*, false);
+ TEST_TT(double*, bool*, false);
+ TEST_TT(double*, int*, false);
+ TEST_TT(double*, double*, false);
+ TEST_TT(double*, A*, false);
+ TEST_TT(double*, B*, false);
+ TEST_TT(A*, void*, false);
+ TEST_TT(A*, bool*, false);
+ TEST_TT(A*, int*, false);
+ TEST_TT(A*, double*, false);
+ TEST_TT(A*, A*, false);
+ TEST_TT(A*, B*, false);
+ TEST_TT(B*, void*, false);
+ TEST_TT(B*, bool*, false);
+ TEST_TT(B*, int*, false);
+ TEST_TT(B*, double*, false);
+ TEST_TT(B*, A*, false);
+ TEST_TT(B*, B*, false);
+ TEST_TT(C, void*, true);
+ TEST_TT(D, void*, false);
+ TEST_TT(void*, C, false);
+ TEST_TT(void*, D, true);
+ TEST_TT(C, D, true);
+}
+}
+
+TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
+ run();
+TT_TEST_END

Modified: sandbox/type_traits/libs/type_traits/test/has_integral_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_integral_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_integral_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -82,6 +82,37 @@
    TEST_T(double, false);
    TEST_T(long double, false);
    TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), false);
+
    // test with only two template parameters
    TEST_TT(bool, bool, true);
    TEST_TT(bool, char, true);
@@ -701,6 +732,474 @@
    TEST_TTR(long double, float, tag, false);
    TEST_TTR(long double, double, tag, false);
    TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
 
    TEST_T(without, false);
    TEST_T(internal, true);

Modified: sandbox/type_traits/libs/type_traits/test/has_minus_equal_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_minus_equal_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_minus_equal_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -82,6 +82,37 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+
    // test with only two template parameters
    TEST_TT(bool, bool, true);
    TEST_TT(bool, char, true);
@@ -701,6 +732,474 @@
    TEST_TTR(long double, float, tag, false);
    TEST_TTR(long double, double, tag, false);
    TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
 
    TEST_T(without, false);
    TEST_T(internal, true);

Added: sandbox/type_traits/libs/type_traits/test/has_no_pointer_no_constlhs_operator_test.hpp
==============================================================================
--- (empty file)
+++ sandbox/type_traits/libs/type_traits/test/has_no_pointer_no_constlhs_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -0,0 +1,1346 @@
+// (C) Copyright Frederic Bron 2009-2010.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <typeinfo>
+#include <string>
+
+// test with one template parameter
+#define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::BOOST_TT_TRAIT_NAME<TYPE>::value), RESULT)
+// test with one template parameter plus return value
+#define TEST_TR(TYPE,RET,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::BOOST_TT_TRAIT_NAME<TYPE,TYPE,RET>::value), RESULT)
+// test with two template parameters
+#define TEST_TT(TYPE1,TYPE2,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::BOOST_TT_TRAIT_NAME<TYPE1,TYPE2>::value), RESULT)
+// test with two template parameters plus return value
+#define TEST_TTR(TYPE1,TYPE2,RET,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::BOOST_TT_TRAIT_NAME<TYPE1,TYPE2,RET>::value), RESULT)
+
+namespace {
+
+struct ret { };
+
+struct without { };
+
+struct internal { ret operator BOOST_TT_TRAIT_OP (const internal&) const; };
+
+struct external { };
+ret operator BOOST_TT_TRAIT_OP (const external&, const external&);
+
+class internal_private { ret operator BOOST_TT_TRAIT_OP (const internal_private&) const; };
+
+struct returns_int { int operator BOOST_TT_TRAIT_OP (const returns_int&); };
+
+struct returns_void { void operator BOOST_TT_TRAIT_OP (const returns_void&); };
+
+struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (const returns_void_star&); };
+
+struct returns_double { double operator BOOST_TT_TRAIT_OP (const returns_double&); };
+
+struct returns_string { std::string operator BOOST_TT_TRAIT_OP (const returns_string&); };
+
+//struct convertible_to_bool { operator bool () const; };
+//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (const returns_convertible_to_bool&); };
+
+class Base1 { };
+class Derived1 : public Base1 { };
+
+bool operator BOOST_TT_TRAIT_OP (const Base1&, const Base1&) { return true; }
+
+class Base2 { };
+struct Derived2 : public Base2 {
+ Derived2(int); // to check if it works with a class that is not default constructible
+};
+
+bool operator BOOST_TT_TRAIT_OP (const Derived2&, const Derived2&) { return true; }
+
+struct tag { };
+
+struct A { };
+struct B : public A { };
+
+struct C { };
+struct D { };
+bool operator BOOST_TT_TRAIT_OP (const C&, void*) { return true; }
+bool operator BOOST_TT_TRAIT_OP (void*, const D&) { return true; }
+bool operator BOOST_TT_TRAIT_OP (const C&, const D&) { return true; }
+
+void run() {
+ // test with only one template parameter
+ TEST_T(bool, true);
+ TEST_T(char, true);
+ TEST_T(signed char, true);
+ TEST_T(short int, true);
+ TEST_T(int, true);
+ TEST_T(long int, true);
+ TEST_T(unsigned char, true);
+ TEST_T(unsigned short int, true);
+ TEST_T(unsigned int, true);
+ TEST_T(unsigned long int, true);
+ TEST_T(wchar_t, true);
+ TEST_T(float, true);
+ TEST_T(double, true);
+ TEST_T(long double, true);
+ TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+
+ // test with only two template parameters
+ TEST_TT(bool, bool, true);
+ TEST_TT(bool, char, true);
+ TEST_TT(bool, signed char, true);
+ TEST_TT(bool, short int, true);
+ TEST_TT(bool, int, true);
+ TEST_TT(bool, long int, true);
+ TEST_TT(bool, unsigned char, true);
+ TEST_TT(bool, unsigned short int, true);
+ TEST_TT(bool, unsigned int, true);
+ TEST_TT(bool, unsigned long int, true);
+ TEST_TT(bool, wchar_t, true);
+ TEST_TT(bool, float, true);
+ TEST_TT(bool, double, true);
+ TEST_TT(bool, long double, true);
+ TEST_TT(char, bool, true);
+ TEST_TT(char, char, true);
+ TEST_TT(char, signed char, true);
+ TEST_TT(char, short int, true);
+ TEST_TT(char, int, true);
+ TEST_TT(char, long int, true);
+ TEST_TT(char, unsigned char, true);
+ TEST_TT(char, unsigned short int, true);
+ TEST_TT(char, unsigned int, true);
+ TEST_TT(char, unsigned long int, true);
+ TEST_TT(char, wchar_t, true);
+ TEST_TT(char, float, true);
+ TEST_TT(char, double, true);
+ TEST_TT(char, long double, true);
+ TEST_TT(signed char, bool, true);
+ TEST_TT(signed char, char, true);
+ TEST_TT(signed char, signed char, true);
+ TEST_TT(signed char, short int, true);
+ TEST_TT(signed char, int, true);
+ TEST_TT(signed char, long int, true);
+ TEST_TT(signed char, unsigned char, true);
+ TEST_TT(signed char, unsigned short int, true);
+ TEST_TT(signed char, unsigned int, true);
+ TEST_TT(signed char, unsigned long int, true);
+ TEST_TT(signed char, wchar_t, true);
+ TEST_TT(signed char, float, true);
+ TEST_TT(signed char, double, true);
+ TEST_TT(signed char, long double, true);
+ TEST_TT(short int, bool, true);
+ TEST_TT(short int, char, true);
+ TEST_TT(short int, signed char, true);
+ TEST_TT(short int, short int, true);
+ TEST_TT(short int, int, true);
+ TEST_TT(short int, long int, true);
+ TEST_TT(short int, unsigned char, true);
+ TEST_TT(short int, unsigned short int, true);
+ TEST_TT(short int, unsigned int, true);
+ TEST_TT(short int, unsigned long int, true);
+ TEST_TT(short int, wchar_t, true);
+ TEST_TT(short int, float, true);
+ TEST_TT(short int, double, true);
+ TEST_TT(short int, long double, true);
+ TEST_TT(int, bool, true);
+ TEST_TT(int, char, true);
+ TEST_TT(int, signed char, true);
+ TEST_TT(int, short int, true);
+ TEST_TT(int, int, true);
+ TEST_TT(int, long int, true);
+ TEST_TT(int, unsigned char, true);
+ TEST_TT(int, unsigned short int, true);
+ TEST_TT(int, unsigned int, true);
+ TEST_TT(int, unsigned long int, true);
+ TEST_TT(int, wchar_t, true);
+ TEST_TT(int, float, true);
+ TEST_TT(int, double, true);
+ TEST_TT(int, long double, true);
+ TEST_TT(long int, bool, true);
+ TEST_TT(long int, char, true);
+ TEST_TT(long int, signed char, true);
+ TEST_TT(long int, short int, true);
+ TEST_TT(long int, int, true);
+ TEST_TT(long int, long int, true);
+ TEST_TT(long int, unsigned char, true);
+ TEST_TT(long int, unsigned short int, true);
+ TEST_TT(long int, unsigned int, true);
+ TEST_TT(long int, unsigned long int, true);
+ TEST_TT(long int, wchar_t, true);
+ TEST_TT(long int, float, true);
+ TEST_TT(long int, double, true);
+ TEST_TT(long int, long double, true);
+ TEST_TT(unsigned char, bool, true);
+ TEST_TT(unsigned char, char, true);
+ TEST_TT(unsigned char, signed char, true);
+ TEST_TT(unsigned char, short int, true);
+ TEST_TT(unsigned char, int, true);
+ TEST_TT(unsigned char, long int, true);
+ TEST_TT(unsigned char, unsigned char, true);
+ TEST_TT(unsigned char, unsigned short int, true);
+ TEST_TT(unsigned char, unsigned int, true);
+ TEST_TT(unsigned char, unsigned long int, true);
+ TEST_TT(unsigned char, wchar_t, true);
+ TEST_TT(unsigned char, float, true);
+ TEST_TT(unsigned char, double, true);
+ TEST_TT(unsigned char, long double, true);
+ TEST_TT(unsigned short int, bool, true);
+ TEST_TT(unsigned short int, char, true);
+ TEST_TT(unsigned short int, signed char, true);
+ TEST_TT(unsigned short int, short int, true);
+ TEST_TT(unsigned short int, int, true);
+ TEST_TT(unsigned short int, long int, true);
+ TEST_TT(unsigned short int, unsigned char, true);
+ TEST_TT(unsigned short int, unsigned short int, true);
+ TEST_TT(unsigned short int, unsigned int, true);
+ TEST_TT(unsigned short int, unsigned long int, true);
+ TEST_TT(unsigned short int, wchar_t, true);
+ TEST_TT(unsigned short int, float, true);
+ TEST_TT(unsigned short int, double, true);
+ TEST_TT(unsigned short int, long double, true);
+ TEST_TT(unsigned int, bool, true);
+ TEST_TT(unsigned int, char, true);
+ TEST_TT(unsigned int, signed char, true);
+ TEST_TT(unsigned int, short int, true);
+ TEST_TT(unsigned int, int, true);
+ TEST_TT(unsigned int, long int, true);
+ TEST_TT(unsigned int, unsigned char, true);
+ TEST_TT(unsigned int, unsigned short int, true);
+ TEST_TT(unsigned int, unsigned int, true);
+ TEST_TT(unsigned int, unsigned long int, true);
+ TEST_TT(unsigned int, wchar_t, true);
+ TEST_TT(unsigned int, float, true);
+ TEST_TT(unsigned int, double, true);
+ TEST_TT(unsigned int, long double, true);
+ TEST_TT(unsigned long int, bool, true);
+ TEST_TT(unsigned long int, char, true);
+ TEST_TT(unsigned long int, signed char, true);
+ TEST_TT(unsigned long int, short int, true);
+ TEST_TT(unsigned long int, int, true);
+ TEST_TT(unsigned long int, long int, true);
+ TEST_TT(unsigned long int, unsigned char, true);
+ TEST_TT(unsigned long int, unsigned short int, true);
+ TEST_TT(unsigned long int, unsigned int, true);
+ TEST_TT(unsigned long int, unsigned long int, true);
+ TEST_TT(unsigned long int, wchar_t, true);
+ TEST_TT(unsigned long int, float, true);
+ TEST_TT(unsigned long int, double, true);
+ TEST_TT(unsigned long int, long double, true);
+ TEST_TT(wchar_t, bool, true);
+ TEST_TT(wchar_t, char, true);
+ TEST_TT(wchar_t, signed char, true);
+ TEST_TT(wchar_t, short int, true);
+ TEST_TT(wchar_t, int, true);
+ TEST_TT(wchar_t, long int, true);
+ TEST_TT(wchar_t, unsigned char, true);
+ TEST_TT(wchar_t, unsigned short int, true);
+ TEST_TT(wchar_t, unsigned int, true);
+ TEST_TT(wchar_t, unsigned long int, true);
+ TEST_TT(wchar_t, wchar_t, true);
+ TEST_TT(wchar_t, float, true);
+ TEST_TT(wchar_t, double, true);
+ TEST_TT(wchar_t, long double, true);
+ TEST_TT(float, bool, true);
+ TEST_TT(float, char, true);
+ TEST_TT(float, signed char, true);
+ TEST_TT(float, short int, true);
+ TEST_TT(float, int, true);
+ TEST_TT(float, long int, true);
+ TEST_TT(float, unsigned char, true);
+ TEST_TT(float, unsigned short int, true);
+ TEST_TT(float, unsigned int, true);
+ TEST_TT(float, unsigned long int, true);
+ TEST_TT(float, wchar_t, true);
+ TEST_TT(float, float, true);
+ TEST_TT(float, double, true);
+ TEST_TT(float, long double, true);
+ TEST_TT(double, bool, true);
+ TEST_TT(double, char, true);
+ TEST_TT(double, signed char, true);
+ TEST_TT(double, short int, true);
+ TEST_TT(double, int, true);
+ TEST_TT(double, long int, true);
+ TEST_TT(double, unsigned char, true);
+ TEST_TT(double, unsigned short int, true);
+ TEST_TT(double, unsigned int, true);
+ TEST_TT(double, unsigned long int, true);
+ TEST_TT(double, wchar_t, true);
+ TEST_TT(double, float, true);
+ TEST_TT(double, double, true);
+ TEST_TT(double, long double, true);
+ TEST_TT(long double, bool, true);
+ TEST_TT(long double, char, true);
+ TEST_TT(long double, signed char, true);
+ TEST_TT(long double, short int, true);
+ TEST_TT(long double, int, true);
+ TEST_TT(long double, long int, true);
+ TEST_TT(long double, unsigned char, true);
+ TEST_TT(long double, unsigned short int, true);
+ TEST_TT(long double, unsigned int, true);
+ TEST_TT(long double, unsigned long int, true);
+ TEST_TT(long double, wchar_t, true);
+ TEST_TT(long double, float, true);
+ TEST_TT(long double, double, true);
+ TEST_TT(long double, long double, true);
+ TEST_TT(bool, void, false);
+ TEST_TT(void, bool, false);
+ TEST_TT(char, void, false);
+ TEST_TT(void, char, false);
+ TEST_TT(signed char, void, false);
+ TEST_TT(void, signed char, false);
+ TEST_TT(short int, void, false);
+ TEST_TT(void, short int, false);
+ TEST_TT(int, void, false);
+ TEST_TT(void, int, false);
+ TEST_TT(long int, void, false);
+ TEST_TT(void, long int, false);
+ TEST_TT(unsigned char, void, false);
+ TEST_TT(void, unsigned char, false);
+ TEST_TT(unsigned short int, void, false);
+ TEST_TT(void, unsigned short int, false);
+ TEST_TT(unsigned int, void, false);
+ TEST_TT(void, unsigned int, false);
+ TEST_TT(unsigned long int, void, false);
+ TEST_TT(void, unsigned long int, false);
+ TEST_TT(wchar_t, void, false);
+ TEST_TT(void, wchar_t, false);
+ TEST_TT(float, void, false);
+ TEST_TT(void, float, false);
+ TEST_TT(double, void, false);
+ TEST_TT(void, double, false);
+ TEST_TT(long double, void, false);
+ TEST_TT(void, long double, false);
+
+// test with three template parameters
+ TEST_TTR(bool, bool, bool, true);
+ TEST_TTR(bool, char, bool, true);
+ TEST_TTR(bool, signed char, bool, true);
+ TEST_TTR(bool, short int, bool, true);
+ TEST_TTR(bool, int, bool, true);
+ TEST_TTR(bool, long int, bool, true);
+ TEST_TTR(bool, unsigned char, bool, true);
+ TEST_TTR(bool, unsigned short int, bool, true);
+ TEST_TTR(bool, unsigned int, bool, true);
+ TEST_TTR(bool, unsigned long int, bool, true);
+ TEST_TTR(bool, wchar_t, bool, true);
+ TEST_TTR(bool, float, bool, true);
+ TEST_TTR(bool, double, bool, true);
+ TEST_TTR(bool, long double, bool, true);
+ TEST_TTR(char, bool, bool, true);
+ TEST_TTR(char, char, bool, true);
+ TEST_TTR(char, signed char, bool, true);
+ TEST_TTR(char, short int, bool, true);
+ TEST_TTR(char, int, bool, true);
+ TEST_TTR(char, long int, bool, true);
+ TEST_TTR(char, unsigned char, bool, true);
+ TEST_TTR(char, unsigned short int, bool, true);
+ TEST_TTR(char, unsigned int, bool, true);
+ TEST_TTR(char, unsigned long int, bool, true);
+ TEST_TTR(char, wchar_t, bool, true);
+ TEST_TTR(char, float, bool, true);
+ TEST_TTR(char, double, bool, true);
+ TEST_TTR(char, long double, bool, true);
+ TEST_TTR(signed char, bool, bool, true);
+ TEST_TTR(signed char, char, bool, true);
+ TEST_TTR(signed char, signed char, bool, true);
+ TEST_TTR(signed char, short int, bool, true);
+ TEST_TTR(signed char, int, bool, true);
+ TEST_TTR(signed char, long int, bool, true);
+ TEST_TTR(signed char, unsigned char, bool, true);
+ TEST_TTR(signed char, unsigned short int, bool, true);
+ TEST_TTR(signed char, unsigned int, bool, true);
+ TEST_TTR(signed char, unsigned long int, bool, true);
+ TEST_TTR(signed char, wchar_t, bool, true);
+ TEST_TTR(signed char, float, bool, true);
+ TEST_TTR(signed char, double, bool, true);
+ TEST_TTR(signed char, long double, bool, true);
+ TEST_TTR(short int, bool, bool, true);
+ TEST_TTR(short int, char, bool, true);
+ TEST_TTR(short int, signed char, bool, true);
+ TEST_TTR(short int, short int, bool, true);
+ TEST_TTR(short int, int, bool, true);
+ TEST_TTR(short int, long int, bool, true);
+ TEST_TTR(short int, unsigned char, bool, true);
+ TEST_TTR(short int, unsigned short int, bool, true);
+ TEST_TTR(short int, unsigned int, bool, true);
+ TEST_TTR(short int, unsigned long int, bool, true);
+ TEST_TTR(short int, wchar_t, bool, true);
+ TEST_TTR(short int, float, bool, true);
+ TEST_TTR(short int, double, bool, true);
+ TEST_TTR(short int, long double, bool, true);
+ TEST_TTR(int, bool, bool, true);
+ TEST_TTR(int, char, bool, true);
+ TEST_TTR(int, signed char, bool, true);
+ TEST_TTR(int, short int, bool, true);
+ TEST_TTR(int, int, bool, true);
+ TEST_TTR(int, long int, bool, true);
+ TEST_TTR(int, unsigned char, bool, true);
+ TEST_TTR(int, unsigned short int, bool, true);
+ TEST_TTR(int, unsigned int, bool, true);
+ TEST_TTR(int, unsigned long int, bool, true);
+ TEST_TTR(int, wchar_t, bool, true);
+ TEST_TTR(int, float, bool, true);
+ TEST_TTR(int, double, bool, true);
+ TEST_TTR(int, long double, bool, true);
+ TEST_TTR(long int, bool, bool, true);
+ TEST_TTR(long int, char, bool, true);
+ TEST_TTR(long int, signed char, bool, true);
+ TEST_TTR(long int, short int, bool, true);
+ TEST_TTR(long int, int, bool, true);
+ TEST_TTR(long int, long int, bool, true);
+ TEST_TTR(long int, unsigned char, bool, true);
+ TEST_TTR(long int, unsigned short int, bool, true);
+ TEST_TTR(long int, unsigned int, bool, true);
+ TEST_TTR(long int, unsigned long int, bool, true);
+ TEST_TTR(long int, wchar_t, bool, true);
+ TEST_TTR(long int, float, bool, true);
+ TEST_TTR(long int, double, bool, true);
+ TEST_TTR(long int, long double, bool, true);
+ TEST_TTR(unsigned char, bool, bool, true);
+ TEST_TTR(unsigned char, char, bool, true);
+ TEST_TTR(unsigned char, signed char, bool, true);
+ TEST_TTR(unsigned char, short int, bool, true);
+ TEST_TTR(unsigned char, int, bool, true);
+ TEST_TTR(unsigned char, long int, bool, true);
+ TEST_TTR(unsigned char, unsigned char, bool, true);
+ TEST_TTR(unsigned char, unsigned short int, bool, true);
+ TEST_TTR(unsigned char, unsigned int, bool, true);
+ TEST_TTR(unsigned char, unsigned long int, bool, true);
+ TEST_TTR(unsigned char, wchar_t, bool, true);
+ TEST_TTR(unsigned char, float, bool, true);
+ TEST_TTR(unsigned char, double, bool, true);
+ TEST_TTR(unsigned char, long double, bool, true);
+ TEST_TTR(unsigned short int, bool, bool, true);
+ TEST_TTR(unsigned short int, char, bool, true);
+ TEST_TTR(unsigned short int, signed char, bool, true);
+ TEST_TTR(unsigned short int, short int, bool, true);
+ TEST_TTR(unsigned short int, int, bool, true);
+ TEST_TTR(unsigned short int, long int, bool, true);
+ TEST_TTR(unsigned short int, unsigned char, bool, true);
+ TEST_TTR(unsigned short int, unsigned short int, bool, true);
+ TEST_TTR(unsigned short int, unsigned int, bool, true);
+ TEST_TTR(unsigned short int, unsigned long int, bool, true);
+ TEST_TTR(unsigned short int, wchar_t, bool, true);
+ TEST_TTR(unsigned short int, float, bool, true);
+ TEST_TTR(unsigned short int, double, bool, true);
+ TEST_TTR(unsigned short int, long double, bool, true);
+ TEST_TTR(unsigned int, bool, bool, true);
+ TEST_TTR(unsigned int, char, bool, true);
+ TEST_TTR(unsigned int, signed char, bool, true);
+ TEST_TTR(unsigned int, short int, bool, true);
+ TEST_TTR(unsigned int, int, bool, true);
+ TEST_TTR(unsigned int, long int, bool, true);
+ TEST_TTR(unsigned int, unsigned char, bool, true);
+ TEST_TTR(unsigned int, unsigned short int, bool, true);
+ TEST_TTR(unsigned int, unsigned int, bool, true);
+ TEST_TTR(unsigned int, unsigned long int, bool, true);
+ TEST_TTR(unsigned int, wchar_t, bool, true);
+ TEST_TTR(unsigned int, float, bool, true);
+ TEST_TTR(unsigned int, double, bool, true);
+ TEST_TTR(unsigned int, long double, bool, true);
+ TEST_TTR(unsigned long int, bool, bool, true);
+ TEST_TTR(unsigned long int, char, bool, true);
+ TEST_TTR(unsigned long int, signed char, bool, true);
+ TEST_TTR(unsigned long int, short int, bool, true);
+ TEST_TTR(unsigned long int, int, bool, true);
+ TEST_TTR(unsigned long int, long int, bool, true);
+ TEST_TTR(unsigned long int, unsigned char, bool, true);
+ TEST_TTR(unsigned long int, unsigned short int, bool, true);
+ TEST_TTR(unsigned long int, unsigned int, bool, true);
+ TEST_TTR(unsigned long int, unsigned long int, bool, true);
+ TEST_TTR(unsigned long int, wchar_t, bool, true);
+ TEST_TTR(unsigned long int, float, bool, true);
+ TEST_TTR(unsigned long int, double, bool, true);
+ TEST_TTR(unsigned long int, long double, bool, true);
+ TEST_TTR(wchar_t, bool, bool, true);
+ TEST_TTR(wchar_t, char, bool, true);
+ TEST_TTR(wchar_t, signed char, bool, true);
+ TEST_TTR(wchar_t, short int, bool, true);
+ TEST_TTR(wchar_t, int, bool, true);
+ TEST_TTR(wchar_t, long int, bool, true);
+ TEST_TTR(wchar_t, unsigned char, bool, true);
+ TEST_TTR(wchar_t, unsigned short int, bool, true);
+ TEST_TTR(wchar_t, unsigned int, bool, true);
+ TEST_TTR(wchar_t, unsigned long int, bool, true);
+ TEST_TTR(wchar_t, wchar_t, bool, true);
+ TEST_TTR(wchar_t, float, bool, true);
+ TEST_TTR(wchar_t, double, bool, true);
+ TEST_TTR(wchar_t, long double, bool, true);
+ TEST_TTR(float, bool, bool, true);
+ TEST_TTR(float, char, bool, true);
+ TEST_TTR(float, signed char, bool, true);
+ TEST_TTR(float, short int, bool, true);
+ TEST_TTR(float, int, bool, true);
+ TEST_TTR(float, long int, bool, true);
+ TEST_TTR(float, unsigned char, bool, true);
+ TEST_TTR(float, unsigned short int, bool, true);
+ TEST_TTR(float, unsigned int, bool, true);
+ TEST_TTR(float, unsigned long int, bool, true);
+ TEST_TTR(float, wchar_t, bool, true);
+ TEST_TTR(float, float, bool, true);
+ TEST_TTR(float, double, bool, true);
+ TEST_TTR(float, long double, bool, true);
+ TEST_TTR(double, bool, bool, true);
+ TEST_TTR(double, char, bool, true);
+ TEST_TTR(double, signed char, bool, true);
+ TEST_TTR(double, short int, bool, true);
+ TEST_TTR(double, int, bool, true);
+ TEST_TTR(double, long int, bool, true);
+ TEST_TTR(double, unsigned char, bool, true);
+ TEST_TTR(double, unsigned short int, bool, true);
+ TEST_TTR(double, unsigned int, bool, true);
+ TEST_TTR(double, unsigned long int, bool, true);
+ TEST_TTR(double, wchar_t, bool, true);
+ TEST_TTR(double, float, bool, true);
+ TEST_TTR(double, double, bool, true);
+ TEST_TTR(double, long double, bool, true);
+ TEST_TTR(long double, bool, bool, true);
+ TEST_TTR(long double, char, bool, true);
+ TEST_TTR(long double, signed char, bool, true);
+ TEST_TTR(long double, short int, bool, true);
+ TEST_TTR(long double, int, bool, true);
+ TEST_TTR(long double, long int, bool, true);
+ TEST_TTR(long double, unsigned char, bool, true);
+ TEST_TTR(long double, unsigned short int, bool, true);
+ TEST_TTR(long double, unsigned int, bool, true);
+ TEST_TTR(long double, unsigned long int, bool, true);
+ TEST_TTR(long double, wchar_t, bool, true);
+ TEST_TTR(long double, float, bool, true);
+ TEST_TTR(long double, double, bool, true);
+ TEST_TTR(long double, long double, bool, true);
+ TEST_TTR(bool, bool, tag, false);
+ TEST_TTR(bool, char, tag, false);
+ TEST_TTR(bool, signed char, tag, false);
+ TEST_TTR(bool, short int, tag, false);
+ TEST_TTR(bool, int, tag, false);
+ TEST_TTR(bool, long int, tag, false);
+ TEST_TTR(bool, unsigned char, tag, false);
+ TEST_TTR(bool, unsigned short int, tag, false);
+ TEST_TTR(bool, unsigned int, tag, false);
+ TEST_TTR(bool, unsigned long int, tag, false);
+ TEST_TTR(bool, wchar_t, tag, false);
+ TEST_TTR(bool, float, tag, false);
+ TEST_TTR(bool, double, tag, false);
+ TEST_TTR(bool, long double, tag, false);
+ TEST_TTR(char, bool, tag, false);
+ TEST_TTR(char, char, tag, false);
+ TEST_TTR(char, signed char, tag, false);
+ TEST_TTR(char, short int, tag, false);
+ TEST_TTR(char, int, tag, false);
+ TEST_TTR(char, long int, tag, false);
+ TEST_TTR(char, unsigned char, tag, false);
+ TEST_TTR(char, unsigned short int, tag, false);
+ TEST_TTR(char, unsigned int, tag, false);
+ TEST_TTR(char, unsigned long int, tag, false);
+ TEST_TTR(char, wchar_t, tag, false);
+ TEST_TTR(char, float, tag, false);
+ TEST_TTR(char, double, tag, false);
+ TEST_TTR(char, long double, tag, false);
+ TEST_TTR(signed char, bool, tag, false);
+ TEST_TTR(signed char, char, tag, false);
+ TEST_TTR(signed char, signed char, tag, false);
+ TEST_TTR(signed char, short int, tag, false);
+ TEST_TTR(signed char, int, tag, false);
+ TEST_TTR(signed char, long int, tag, false);
+ TEST_TTR(signed char, unsigned char, tag, false);
+ TEST_TTR(signed char, unsigned short int, tag, false);
+ TEST_TTR(signed char, unsigned int, tag, false);
+ TEST_TTR(signed char, unsigned long int, tag, false);
+ TEST_TTR(signed char, wchar_t, tag, false);
+ TEST_TTR(signed char, float, tag, false);
+ TEST_TTR(signed char, double, tag, false);
+ TEST_TTR(signed char, long double, tag, false);
+ TEST_TTR(short int, bool, tag, false);
+ TEST_TTR(short int, char, tag, false);
+ TEST_TTR(short int, signed char, tag, false);
+ TEST_TTR(short int, short int, tag, false);
+ TEST_TTR(short int, int, tag, false);
+ TEST_TTR(short int, long int, tag, false);
+ TEST_TTR(short int, unsigned char, tag, false);
+ TEST_TTR(short int, unsigned short int, tag, false);
+ TEST_TTR(short int, unsigned int, tag, false);
+ TEST_TTR(short int, unsigned long int, tag, false);
+ TEST_TTR(short int, wchar_t, tag, false);
+ TEST_TTR(short int, float, tag, false);
+ TEST_TTR(short int, double, tag, false);
+ TEST_TTR(short int, long double, tag, false);
+ TEST_TTR(int, bool, tag, false);
+ TEST_TTR(int, char, tag, false);
+ TEST_TTR(int, signed char, tag, false);
+ TEST_TTR(int, short int, tag, false);
+ TEST_TTR(int, int, tag, false);
+ TEST_TTR(int, long int, tag, false);
+ TEST_TTR(int, unsigned char, tag, false);
+ TEST_TTR(int, unsigned short int, tag, false);
+ TEST_TTR(int, unsigned int, tag, false);
+ TEST_TTR(int, unsigned long int, tag, false);
+ TEST_TTR(int, wchar_t, tag, false);
+ TEST_TTR(int, float, tag, false);
+ TEST_TTR(int, double, tag, false);
+ TEST_TTR(int, long double, tag, false);
+ TEST_TTR(long int, bool, tag, false);
+ TEST_TTR(long int, char, tag, false);
+ TEST_TTR(long int, signed char, tag, false);
+ TEST_TTR(long int, short int, tag, false);
+ TEST_TTR(long int, int, tag, false);
+ TEST_TTR(long int, long int, tag, false);
+ TEST_TTR(long int, unsigned char, tag, false);
+ TEST_TTR(long int, unsigned short int, tag, false);
+ TEST_TTR(long int, unsigned int, tag, false);
+ TEST_TTR(long int, unsigned long int, tag, false);
+ TEST_TTR(long int, wchar_t, tag, false);
+ TEST_TTR(long int, float, tag, false);
+ TEST_TTR(long int, double, tag, false);
+ TEST_TTR(long int, long double, tag, false);
+ TEST_TTR(unsigned char, bool, tag, false);
+ TEST_TTR(unsigned char, char, tag, false);
+ TEST_TTR(unsigned char, signed char, tag, false);
+ TEST_TTR(unsigned char, short int, tag, false);
+ TEST_TTR(unsigned char, int, tag, false);
+ TEST_TTR(unsigned char, long int, tag, false);
+ TEST_TTR(unsigned char, unsigned char, tag, false);
+ TEST_TTR(unsigned char, unsigned short int, tag, false);
+ TEST_TTR(unsigned char, unsigned int, tag, false);
+ TEST_TTR(unsigned char, unsigned long int, tag, false);
+ TEST_TTR(unsigned char, wchar_t, tag, false);
+ TEST_TTR(unsigned char, float, tag, false);
+ TEST_TTR(unsigned char, double, tag, false);
+ TEST_TTR(unsigned char, long double, tag, false);
+ TEST_TTR(unsigned short int, bool, tag, false);
+ TEST_TTR(unsigned short int, char, tag, false);
+ TEST_TTR(unsigned short int, signed char, tag, false);
+ TEST_TTR(unsigned short int, short int, tag, false);
+ TEST_TTR(unsigned short int, int, tag, false);
+ TEST_TTR(unsigned short int, long int, tag, false);
+ TEST_TTR(unsigned short int, unsigned char, tag, false);
+ TEST_TTR(unsigned short int, unsigned short int, tag, false);
+ TEST_TTR(unsigned short int, unsigned int, tag, false);
+ TEST_TTR(unsigned short int, unsigned long int, tag, false);
+ TEST_TTR(unsigned short int, wchar_t, tag, false);
+ TEST_TTR(unsigned short int, float, tag, false);
+ TEST_TTR(unsigned short int, double, tag, false);
+ TEST_TTR(unsigned short int, long double, tag, false);
+ TEST_TTR(unsigned int, bool, tag, false);
+ TEST_TTR(unsigned int, char, tag, false);
+ TEST_TTR(unsigned int, signed char, tag, false);
+ TEST_TTR(unsigned int, short int, tag, false);
+ TEST_TTR(unsigned int, int, tag, false);
+ TEST_TTR(unsigned int, long int, tag, false);
+ TEST_TTR(unsigned int, unsigned char, tag, false);
+ TEST_TTR(unsigned int, unsigned short int, tag, false);
+ TEST_TTR(unsigned int, unsigned int, tag, false);
+ TEST_TTR(unsigned int, unsigned long int, tag, false);
+ TEST_TTR(unsigned int, wchar_t, tag, false);
+ TEST_TTR(unsigned int, float, tag, false);
+ TEST_TTR(unsigned int, double, tag, false);
+ TEST_TTR(unsigned int, long double, tag, false);
+ TEST_TTR(unsigned long int, bool, tag, false);
+ TEST_TTR(unsigned long int, char, tag, false);
+ TEST_TTR(unsigned long int, signed char, tag, false);
+ TEST_TTR(unsigned long int, short int, tag, false);
+ TEST_TTR(unsigned long int, int, tag, false);
+ TEST_TTR(unsigned long int, long int, tag, false);
+ TEST_TTR(unsigned long int, unsigned char, tag, false);
+ TEST_TTR(unsigned long int, unsigned short int, tag, false);
+ TEST_TTR(unsigned long int, unsigned int, tag, false);
+ TEST_TTR(unsigned long int, unsigned long int, tag, false);
+ TEST_TTR(unsigned long int, wchar_t, tag, false);
+ TEST_TTR(unsigned long int, float, tag, false);
+ TEST_TTR(unsigned long int, double, tag, false);
+ TEST_TTR(unsigned long int, long double, tag, false);
+ TEST_TTR(wchar_t, bool, tag, false);
+ TEST_TTR(wchar_t, char, tag, false);
+ TEST_TTR(wchar_t, signed char, tag, false);
+ TEST_TTR(wchar_t, short int, tag, false);
+ TEST_TTR(wchar_t, int, tag, false);
+ TEST_TTR(wchar_t, long int, tag, false);
+ TEST_TTR(wchar_t, unsigned char, tag, false);
+ TEST_TTR(wchar_t, unsigned short int, tag, false);
+ TEST_TTR(wchar_t, unsigned int, tag, false);
+ TEST_TTR(wchar_t, unsigned long int, tag, false);
+ TEST_TTR(wchar_t, wchar_t, tag, false);
+ TEST_TTR(wchar_t, float, tag, false);
+ TEST_TTR(wchar_t, double, tag, false);
+ TEST_TTR(wchar_t, long double, tag, false);
+ TEST_TTR(float, bool, tag, false);
+ TEST_TTR(float, char, tag, false);
+ TEST_TTR(float, signed char, tag, false);
+ TEST_TTR(float, short int, tag, false);
+ TEST_TTR(float, int, tag, false);
+ TEST_TTR(float, long int, tag, false);
+ TEST_TTR(float, unsigned char, tag, false);
+ TEST_TTR(float, unsigned short int, tag, false);
+ TEST_TTR(float, unsigned int, tag, false);
+ TEST_TTR(float, unsigned long int, tag, false);
+ TEST_TTR(float, wchar_t, tag, false);
+ TEST_TTR(float, float, tag, false);
+ TEST_TTR(float, double, tag, false);
+ TEST_TTR(float, long double, tag, false);
+ TEST_TTR(double, bool, tag, false);
+ TEST_TTR(double, char, tag, false);
+ TEST_TTR(double, signed char, tag, false);
+ TEST_TTR(double, short int, tag, false);
+ TEST_TTR(double, int, tag, false);
+ TEST_TTR(double, long int, tag, false);
+ TEST_TTR(double, unsigned char, tag, false);
+ TEST_TTR(double, unsigned short int, tag, false);
+ TEST_TTR(double, unsigned int, tag, false);
+ TEST_TTR(double, unsigned long int, tag, false);
+ TEST_TTR(double, wchar_t, tag, false);
+ TEST_TTR(double, float, tag, false);
+ TEST_TTR(double, double, tag, false);
+ TEST_TTR(double, long double, tag, false);
+ TEST_TTR(long double, bool, tag, false);
+ TEST_TTR(long double, char, tag, false);
+ TEST_TTR(long double, signed char, tag, false);
+ TEST_TTR(long double, short int, tag, false);
+ TEST_TTR(long double, int, tag, false);
+ TEST_TTR(long double, long int, tag, false);
+ TEST_TTR(long double, unsigned char, tag, false);
+ TEST_TTR(long double, unsigned short int, tag, false);
+ TEST_TTR(long double, unsigned int, tag, false);
+ TEST_TTR(long double, unsigned long int, tag, false);
+ TEST_TTR(long double, wchar_t, tag, false);
+ TEST_TTR(long double, float, tag, false);
+ TEST_TTR(long double, double, tag, false);
+ TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+
+ TEST_T(without, false);
+ TEST_T(internal, true);
+ TEST_T(external, true);
+// compile time error
+// TEST_T(internal_private, false);
+ TEST_T(returns_int, true);
+ TEST_T(returns_void, true);
+ TEST_T(returns_void_star, true);
+ TEST_T(returns_double, true);
+ TEST_T(returns_string, true);
+// TEST_T(convertible_to_bool, true);
+ TEST_T(Base1, true);
+ TEST_T(Derived1, true);
+ TEST_T(Base2, false);
+ TEST_T(Derived2, true);
+
+ TEST_TR(without, bool, false);
+ TEST_TR(internal, bool, false);
+ TEST_TR(internal, ret, true);
+ TEST_TR(external, bool, false);
+ TEST_TR(external, ret, true);
+ TEST_TR(returns_int, bool, true);
+ TEST_TR(returns_int, int, true);
+ TEST_TR(returns_void, void, true);
+ TEST_TR(returns_void, bool, false);
+ TEST_TR(returns_void_star, bool, true);
+ TEST_TR(returns_double, bool, true);
+ TEST_TR(returns_double, double, true);
+ TEST_TR(returns_string, bool, false);
+ TEST_TR(returns_string, std::string, true);
+// TEST_TR(convertible_to_bool, bool, true);
+ TEST_TR(Base1, bool, true);
+ TEST_TR(Derived1, bool, true);
+ TEST_TR(Base2, bool, false);
+ TEST_TR(Derived2, bool, true);
+ // pointers
+ TEST_TT(void*, bool, false);
+ TEST_TT(void*, int, false);
+ TEST_TT(void*, double, false);
+ TEST_TT(void*, A, false);
+ TEST_TT(void*, B, false);
+ TEST_TT(bool*, bool, false);
+ TEST_TT(bool*, int, false);
+ TEST_TT(bool*, double, false);
+ TEST_TT(bool*, A, false);
+ TEST_TT(bool*, B, false);
+ TEST_TT(int*, bool, false);
+ TEST_TT(int*, int, false);
+ TEST_TT(int*, double, false);
+ TEST_TT(int*, A, false);
+ TEST_TT(int*, B, false);
+ TEST_TT(double*, bool, false);
+ TEST_TT(double*, int, false);
+ TEST_TT(double*, double, false);
+ TEST_TT(double*, A, false);
+ TEST_TT(double*, B, false);
+ TEST_TT(A*, bool, false);
+ TEST_TT(A*, int, false);
+ TEST_TT(A*, double, false);
+ TEST_TT(A*, A, false);
+ TEST_TT(A*, B, false);
+ TEST_TT(B*, bool, false);
+ TEST_TT(B*, int, false);
+ TEST_TT(B*, double, false);
+ TEST_TT(B*, A, false);
+ TEST_TT(B*, B, false);
+ TEST_TT(bool, void*, false);
+ TEST_TT(bool, bool*, false);
+ TEST_TT(bool, int*, false);
+ TEST_TT(bool, double*, false);
+ TEST_TT(bool, A*, false);
+ TEST_TT(bool, B*, false);
+ TEST_TT(int, void*, false);
+ TEST_TT(int, bool*, false);
+ TEST_TT(int, int*, false);
+ TEST_TT(int, double*, false);
+ TEST_TT(int, A*, false);
+ TEST_TT(int, B*, false);
+ TEST_TT(double, void*, false);
+ TEST_TT(double, bool*, false);
+ TEST_TT(double, int*, false);
+ TEST_TT(double, double*, false);
+ TEST_TT(double, A*, false);
+ TEST_TT(double, B*, false);
+ TEST_TT(A, void*, false);
+ TEST_TT(A, bool*, false);
+ TEST_TT(A, int*, false);
+ TEST_TT(A, double*, false);
+ TEST_TT(A, A*, false);
+ TEST_TT(A, B*, false);
+ TEST_TT(B, void*, false);
+ TEST_TT(B, bool*, false);
+ TEST_TT(B, int*, false);
+ TEST_TT(B, double*, false);
+ TEST_TT(B, A*, false);
+ TEST_TT(B, B*, false);
+ TEST_TT(void*, void*, false);
+ TEST_TT(void*, bool*, false);
+ TEST_TT(void*, int*, false);
+ TEST_TT(void*, double*, false);
+ TEST_TT(void*, A*, false);
+ TEST_TT(void*, B*, false);
+ TEST_TT(bool*, void*, false);
+ TEST_TT(bool*, bool*, false);
+ TEST_TT(bool*, int*, false);
+ TEST_TT(bool*, double*, false);
+ TEST_TT(bool*, A*, false);
+ TEST_TT(bool*, B*, false);
+ TEST_TT(int*, void*, false);
+ TEST_TT(int*, bool*, false);
+ TEST_TT(int*, int*, false);
+ TEST_TT(int*, double*, false);
+ TEST_TT(int*, A*, false);
+ TEST_TT(int*, B*, false);
+ TEST_TT(double*, void*, false);
+ TEST_TT(double*, bool*, false);
+ TEST_TT(double*, int*, false);
+ TEST_TT(double*, double*, false);
+ TEST_TT(double*, A*, false);
+ TEST_TT(double*, B*, false);
+ TEST_TT(A*, void*, false);
+ TEST_TT(A*, bool*, false);
+ TEST_TT(A*, int*, false);
+ TEST_TT(A*, double*, false);
+ TEST_TT(A*, A*, false);
+ TEST_TT(A*, B*, false);
+ TEST_TT(B*, void*, false);
+ TEST_TT(B*, bool*, false);
+ TEST_TT(B*, int*, false);
+ TEST_TT(B*, double*, false);
+ TEST_TT(B*, A*, false);
+ TEST_TT(B*, B*, false);
+ TEST_TT(C, void*, true);
+ TEST_TT(D, void*, false);
+ TEST_TT(void*, C, false);
+ TEST_TT(void*, D, true);
+ TEST_TT(C, D, true);
+}
+}
+
+TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
+ run();
+TT_TEST_END

Modified: sandbox/type_traits/libs/type_traits/test/has_no_pointer_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_no_pointer_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_no_pointer_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -82,6 +82,37 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+
    // test with only two template parameters
    TEST_TT(bool, bool, true);
    TEST_TT(bool, char, true);
@@ -701,6 +732,474 @@
    TEST_TTR(long double, float, tag, false);
    TEST_TTR(long double, double, tag, false);
    TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
 
    TEST_T(without, false);
    TEST_T(internal, true);

Modified: sandbox/type_traits/libs/type_traits/test/has_operator_bit_and_equal_test.cpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_operator_bit_and_equal_test.cpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_operator_bit_and_equal_test.cpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -15,4 +15,4 @@
 #define BOOST_TT_TRAIT_NAME has_operator_bit_and_equal
 #define BOOST_TT_TRAIT_OP &=
 
-#include "has_integral_operator_test.hpp"
+#include "has_integral_no_constlhs_operator_test.hpp"

Modified: sandbox/type_traits/libs/type_traits/test/has_operator_bit_or_equal_test.cpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_operator_bit_or_equal_test.cpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_operator_bit_or_equal_test.cpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -15,4 +15,4 @@
 #define BOOST_TT_TRAIT_NAME has_operator_bit_or_equal
 #define BOOST_TT_TRAIT_OP |=
 
-#include "has_integral_operator_test.hpp"
+#include "has_integral_no_constlhs_operator_test.hpp"

Modified: sandbox/type_traits/libs/type_traits/test/has_operator_bit_xor_equal_test.cpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_operator_bit_xor_equal_test.cpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_operator_bit_xor_equal_test.cpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -15,4 +15,4 @@
 #define BOOST_TT_TRAIT_NAME has_operator_bit_xor_equal
 #define BOOST_TT_TRAIT_OP ^=
 
-#include "has_integral_operator_test.hpp"
+#include "has_integral_no_constlhs_operator_test.hpp"

Modified: sandbox/type_traits/libs/type_traits/test/has_operator_divides_equal_test.cpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_operator_divides_equal_test.cpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_operator_divides_equal_test.cpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -15,4 +15,4 @@
 #define BOOST_TT_TRAIT_NAME has_operator_divides_equal
 #define BOOST_TT_TRAIT_OP /=
 
-#include "has_no_pointer_operator_test.hpp"
+#include "has_no_pointer_no_constlhs_operator_test.hpp"

Modified: sandbox/type_traits/libs/type_traits/test/has_operator_left_shift_equal_test.cpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_operator_left_shift_equal_test.cpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_operator_left_shift_equal_test.cpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -15,4 +15,4 @@
 #define BOOST_TT_TRAIT_NAME has_operator_left_shift_equal
 #define BOOST_TT_TRAIT_OP <<=
 
-#include "has_integral_operator_test.hpp"
+#include "has_integral_no_constlhs_operator_test.hpp"

Modified: sandbox/type_traits/libs/type_traits/test/has_operator_modulus_equal_test.cpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_operator_modulus_equal_test.cpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_operator_modulus_equal_test.cpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -15,4 +15,4 @@
 #define BOOST_TT_TRAIT_NAME has_operator_modulus_equal
 #define BOOST_TT_TRAIT_OP %=
 
-#include "has_integral_operator_test.hpp"
+#include "has_integral_no_constlhs_operator_test.hpp"

Modified: sandbox/type_traits/libs/type_traits/test/has_operator_multiplies_equal_test.cpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_operator_multiplies_equal_test.cpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_operator_multiplies_equal_test.cpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -15,4 +15,4 @@
 #define BOOST_TT_TRAIT_NAME has_operator_multiplies_equal
 #define BOOST_TT_TRAIT_OP *=
 
-#include "has_no_pointer_operator_test.hpp"
+#include "has_no_pointer_no_constlhs_operator_test.hpp"

Modified: sandbox/type_traits/libs/type_traits/test/has_operator_right_shift_equal_test.cpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_operator_right_shift_equal_test.cpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_operator_right_shift_equal_test.cpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -15,4 +15,4 @@
 #define BOOST_TT_TRAIT_NAME has_operator_right_shift_equal
 #define BOOST_TT_TRAIT_OP >>=
 
-#include "has_integral_operator_test.hpp"
+#include "has_integral_no_constlhs_operator_test.hpp"

Modified: sandbox/type_traits/libs/type_traits/test/has_plus_equal_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_plus_equal_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_plus_equal_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -82,6 +82,37 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
+# define CV(T) const T
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) const T&
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+# undef CV
+# define CV(T) volatile T&
+ TEST_T(CV(bool), true);
+ TEST_T(CV(int), true);
+ TEST_T(CV(double), true);
+# undef CV
+# define CV(T) const volatile T&
+ TEST_T(CV(bool), false);
+ TEST_T(CV(int), false);
+ TEST_T(CV(double), false);
+
    // test with only two template parameters
    TEST_TT(bool, bool, true);
    TEST_TT(bool, char, true);
@@ -701,6 +732,474 @@
    TEST_TTR(long double, float, tag, false);
    TEST_TTR(long double, double, tag, false);
    TEST_TTR(long double, long double, tag, false);
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) T
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T
+# undef CV2
+# define CV2(T) const T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const T&
+# undef CV2
+# define CV2(T) const T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T
+# undef CV2
+# define CV2(T) volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) volatile T&
+# undef CV2
+# define CV2(T) volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), true);
+ TEST_TT(CV1(bool), CV2(double), true);
+ TEST_TT(CV1(int), CV2(bool), true);
+ TEST_TT(CV1(int), CV2(double), true);
+ TEST_TT(CV1(double), CV2(bool), true);
+ TEST_TT(CV1(double), CV2(int), true);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(double), bool, true);
+ TEST_TTR(CV1(int), CV2(bool), bool, true);
+ TEST_TTR(CV1(int), CV2(double), bool, true);
+ TEST_TTR(CV1(double), CV2(bool), bool, true);
+ TEST_TTR(CV1(double), CV2(int), bool, true);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T
+# undef CV2
+# define CV2(T) const volatile T
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
+# undef CV1
+# define CV1(T) const volatile T&
+# undef CV2
+# define CV2(T) const volatile T&
+ // test with only two template parameters
+ TEST_TT(CV1(bool), CV2(int), false);
+ TEST_TT(CV1(bool), CV2(double), false);
+ TEST_TT(CV1(int), CV2(bool), false);
+ TEST_TT(CV1(int), CV2(double), false);
+ TEST_TT(CV1(double), CV2(bool), false);
+ TEST_TT(CV1(double), CV2(int), false);
+
+ // test with three template parameters
+ TEST_TTR(CV1(bool), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(double), bool, false);
+ TEST_TTR(CV1(int), CV2(bool), bool, false);
+ TEST_TTR(CV1(int), CV2(double), bool, false);
+ TEST_TTR(CV1(double), CV2(bool), bool, false);
+ TEST_TTR(CV1(double), CV2(int), bool, false);
+ TEST_TTR(CV1(bool), CV2(int), tag, false);
+ TEST_TTR(CV1(bool), CV2(double), tag, false);
+ TEST_TTR(CV1(int), CV2(bool), tag, false);
+ TEST_TTR(CV1(int), CV2(double), tag, false);
+ TEST_TTR(CV1(double), CV2(bool), tag, false);
+ TEST_TTR(CV1(double), CV2(int), tag, false);
+
 
    TEST_T(without, false);
    TEST_T(internal, true);

Modified: sandbox/type_traits/libs/type_traits/test/has_postfix_decrement_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_postfix_decrement_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_postfix_decrement_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -69,26 +69,32 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
 # define CV(T) const T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) const T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);

Modified: sandbox/type_traits/libs/type_traits/test/has_postfix_increment_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_postfix_increment_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_postfix_increment_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -69,26 +69,32 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
 # define CV(T) const T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) const T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);

Modified: sandbox/type_traits/libs/type_traits/test/has_prefix_complement_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_prefix_complement_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_prefix_complement_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -69,26 +69,32 @@
    TEST_T(double, false);
    TEST_T(long double, false);
    TEST_T(void, false);
+# undef CV
 # define CV(T) const T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) const volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) const T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) const volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);

Modified: sandbox/type_traits/libs/type_traits/test/has_prefix_decrement_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_prefix_decrement_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_prefix_decrement_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -69,26 +69,32 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
 # define CV(T) const T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) const T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);

Modified: sandbox/type_traits/libs/type_traits/test/has_prefix_increment_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_prefix_increment_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_prefix_increment_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -69,26 +69,32 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
 # define CV(T) const T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) const T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);
    TEST_T(CV(double), false);
+# undef CV
 # define CV(T) volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T&
    TEST_T(CV(bool), false);
    TEST_T(CV(int), false);

Modified: sandbox/type_traits/libs/type_traits/test/has_prefix_minus_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_prefix_minus_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_prefix_minus_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -69,26 +69,32 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
 # define CV(T) const T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);

Modified: sandbox/type_traits/libs/type_traits/test/has_prefix_plus_not_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_prefix_plus_not_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_prefix_plus_not_operator_test.hpp 2011-02-16 14:34:18 EST (Wed, 16 Feb 2011)
@@ -69,26 +69,32 @@
    TEST_T(double, true);
    TEST_T(long double, true);
    TEST_T(void, false);
+# undef CV
 # define CV(T) const T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);
    TEST_T(CV(double), true);
+# undef CV
 # define CV(T) const volatile T&
    TEST_T(CV(bool), true);
    TEST_T(CV(int), true);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk