Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69350 - sandbox/type_traits/libs/type_traits/test
From: frederic.bron_at_[hidden]
Date: 2011-02-27 16:07:18


Author: bronf
Date: 2011-02-27 16:07:13 EST (Sun, 27 Feb 2011)
New Revision: 69350
URL: http://svn.boost.org/trac/boost/changeset/69350

Log:
operator traits: added tests returns_convertible_to_bool, common test code in common headers (binary, prefix, postfix)
Added:
   sandbox/type_traits/libs/type_traits/test/has_binary_operator_test.hpp (contents, props changed)
   sandbox/type_traits/libs/type_traits/test/has_postfix_operator_test.hpp (contents, props changed)
   sandbox/type_traits/libs/type_traits/test/has_prefix_operator_test.hpp (contents, props changed)
Text files modified:
   sandbox/type_traits/libs/type_traits/test/has_binary_logical_operator_test.hpp | 79 +++++----------------------------------
   sandbox/type_traits/libs/type_traits/test/has_binary_minus_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_binary_plus_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_comparison_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_dereference_operator_test.hpp | 53 ++------------------------
   sandbox/type_traits/libs/type_traits/test/has_integral_no_constlhs_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_integral_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_minus_equal_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_no_pointer_no_constlhs_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_no_pointer_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_plus_equal_operator_test.hpp | 66 ++-------------------------------
   sandbox/type_traits/libs/type_traits/test/has_postfix_decrement_operator_test.hpp | 53 ++------------------------
   sandbox/type_traits/libs/type_traits/test/has_postfix_increment_operator_test.hpp | 53 ++------------------------
   sandbox/type_traits/libs/type_traits/test/has_prefix_complement_operator_test.hpp | 53 ++------------------------
   sandbox/type_traits/libs/type_traits/test/has_prefix_decrement_operator_test.hpp | 53 ++------------------------
   sandbox/type_traits/libs/type_traits/test/has_prefix_increment_operator_test.hpp | 53 ++------------------------
   sandbox/type_traits/libs/type_traits/test/has_prefix_minus_operator_test.hpp | 53 ++------------------------
   sandbox/type_traits/libs/type_traits/test/has_prefix_plus_not_operator_test.hpp | 53 ++------------------------
   18 files changed, 78 insertions(+), 1019 deletions(-)

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,69 +1,11 @@
- // (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)
+// (C) Copyright Frederic Bron 2009-2011.
+// 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)
 
-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&); };
+#include "has_binary_operator_test.hpp"
 
-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; }
+namespace {
 
 void run() {
    // test with only one template parameter
@@ -736,7 +678,6 @@
    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
@@ -1209,14 +1150,14 @@
    TEST_T(without, false);
    TEST_T(internal, true);
    TEST_T(external, true);
- // compile time error
- // TEST_T(internal_private, false);
+// 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(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1236,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1215,7 +1157,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1235,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

Added: sandbox/type_traits/libs/type_traits/test/has_binary_operator_test.hpp
==============================================================================
--- (empty file)
+++ sandbox/type_traits/libs/type_traits/test/has_binary_operator_test.hpp 2011-02-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -0,0 +1,65 @@
+// (C) Copyright Frederic Bron 2009-2011.
+// 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 <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; }
+}

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1215,7 +1157,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1235,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1215,7 +1157,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1235,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

Modified: sandbox/type_traits/libs/type_traits/test/has_dereference_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_dereference_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_dereference_operator_test.hpp 2011-02-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,57 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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,RET>::value), RESULT)
+#include "has_prefix_operator_test.hpp"
 
 namespace {
 
-struct ret { };
-
-struct without { };
-
-struct internal { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct external { };
-ret operator BOOST_TT_TRAIT_OP (const external&);
-
-class internal_private { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct returns_int { int operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void { void operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_double { double operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_string { std::string operator BOOST_TT_TRAIT_OP (); };
-
-//struct convertible_to_bool { operator bool () const; };
-//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (); };
-
-class Base1 { };
-class Derived1 : public Base1 { };
-
-bool operator BOOST_TT_TRAIT_OP (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&) { return true; }
-
-struct tag { };
-
 void run() {
    // test with only one template parameter
    TEST_T(void, false);
@@ -141,7 +96,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -161,7 +116,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

Modified: sandbox/type_traits/libs/type_traits/test/has_integral_no_constlhs_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_integral_no_constlhs_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_integral_no_constlhs_operator_test.hpp 2011-02-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1214,7 +1156,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1234,7 +1176,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1215,7 +1157,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1235,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1215,7 +1157,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1235,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

Modified: sandbox/type_traits/libs/type_traits/test/has_no_pointer_no_constlhs_operator_test.hpp
==============================================================================
--- sandbox/type_traits/libs/type_traits/test/has_no_pointer_no_constlhs_operator_test.hpp (original)
+++ sandbox/type_traits/libs/type_traits/test/has_no_pointer_no_constlhs_operator_test.hpp 2011-02-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1215,7 +1157,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1235,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1215,7 +1157,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1235,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,70 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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)
+#include "has_binary_operator_test.hpp"
 
 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(void, false);
@@ -1215,7 +1157,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -1235,7 +1177,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,57 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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,RET>::value), RESULT)
+#include "has_postfix_operator_test.hpp"
 
 namespace {
 
-struct ret { };
-
-struct without { };
-
-struct internal { ret operator BOOST_TT_TRAIT_OP (int) const; };
-
-struct external { };
-ret operator BOOST_TT_TRAIT_OP (const external&, int);
-
-class internal_private { ret operator BOOST_TT_TRAIT_OP (int) const; };
-
-struct returns_int { int operator BOOST_TT_TRAIT_OP (int); };
-
-struct returns_void { void operator BOOST_TT_TRAIT_OP (int); };
-
-struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (int); };
-
-struct returns_double { double operator BOOST_TT_TRAIT_OP (int); };
-
-struct returns_string { std::string operator BOOST_TT_TRAIT_OP (int); };
-
-//struct convertible_to_bool { operator bool () const; };
-//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (int); };
-
-class Base1 { };
-class Derived1 : public Base1 { };
-
-bool operator BOOST_TT_TRAIT_OP (const Base1&, int) { 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&, int) { return true; }
-
-struct tag { };
-
 void run() {
    // test with only one template parameter
    TEST_T(void, false);
@@ -141,7 +96,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -161,7 +116,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, 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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,57 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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,RET>::value), RESULT)
+#include "has_postfix_operator_test.hpp"
 
 namespace {
 
-struct ret { };
-
-struct without { };
-
-struct internal { ret operator BOOST_TT_TRAIT_OP (int) const; };
-
-struct external { };
-ret operator BOOST_TT_TRAIT_OP (const external&, int);
-
-class internal_private { ret operator BOOST_TT_TRAIT_OP (int) const; };
-
-struct returns_int { int operator BOOST_TT_TRAIT_OP (int); };
-
-struct returns_void { void operator BOOST_TT_TRAIT_OP (int); };
-
-struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (int); };
-
-struct returns_double { double operator BOOST_TT_TRAIT_OP (int); };
-
-struct returns_string { std::string operator BOOST_TT_TRAIT_OP (int); };
-
-//struct convertible_to_bool { operator bool () const; };
-//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (int); };
-
-class Base1 { };
-class Derived1 : public Base1 { };
-
-bool operator BOOST_TT_TRAIT_OP (const Base1&, int) { 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&, int) { return true; }
-
-struct tag { };
-
 void run() {
    // test with only one template parameter
    TEST_T(void, false);
@@ -141,7 +96,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -161,7 +116,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

Added: sandbox/type_traits/libs/type_traits/test/has_postfix_operator_test.hpp
==============================================================================
--- (empty file)
+++ sandbox/type_traits/libs/type_traits/test/has_postfix_operator_test.hpp 2011-02-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -0,0 +1,53 @@
+// (C) Copyright Frederic Bron 2009-2011.
+// 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 <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,RET>::value), RESULT)
+
+namespace {
+
+struct ret { };
+
+struct without { };
+
+struct internal { ret operator BOOST_TT_TRAIT_OP (int) const; };
+
+struct external { };
+ret operator BOOST_TT_TRAIT_OP (const external&, int);
+
+class internal_private { ret operator BOOST_TT_TRAIT_OP (int) const; };
+
+struct returns_int { int operator BOOST_TT_TRAIT_OP (int); };
+
+struct returns_void { void operator BOOST_TT_TRAIT_OP (int); };
+
+struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (int); };
+
+struct returns_double { double operator BOOST_TT_TRAIT_OP (int); };
+
+struct returns_string { std::string operator BOOST_TT_TRAIT_OP (int); };
+
+struct convertible_to_bool { operator bool () const; };
+struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (int); };
+
+class Base1 { };
+class Derived1 : public Base1 { };
+
+bool operator BOOST_TT_TRAIT_OP (const Base1&, int) { 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&, int) { return true; }
+
+struct tag { };
+
+}

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,57 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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,RET>::value), RESULT)
+#include "has_prefix_operator_test.hpp"
 
 namespace {
 
-struct ret { };
-
-struct without { };
-
-struct internal { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct external { };
-ret operator BOOST_TT_TRAIT_OP (const external&);
-
-class internal_private { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct returns_int { int operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void { void operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_double { double operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_string { std::string operator BOOST_TT_TRAIT_OP (); };
-
-//struct convertible_to_bool { operator bool () const; };
-//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (); };
-
-class Base1 { };
-class Derived1 : public Base1 { };
-
-bool operator BOOST_TT_TRAIT_OP (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&) { return true; }
-
-struct tag { };
-
 void run() {
    // test with only one template parameter
    TEST_T(void, false);
@@ -141,7 +96,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -161,7 +116,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,57 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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,RET>::value), RESULT)
+#include "has_prefix_operator_test.hpp"
 
 namespace {
 
-struct ret { };
-
-struct without { };
-
-struct internal { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct external { };
-ret operator BOOST_TT_TRAIT_OP (const external&);
-
-class internal_private { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct returns_int { int operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void { void operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_double { double operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_string { std::string operator BOOST_TT_TRAIT_OP (); };
-
-//struct convertible_to_bool { operator bool () const; };
-//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (); };
-
-class Base1 { };
-class Derived1 : public Base1 { };
-
-bool operator BOOST_TT_TRAIT_OP (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&) { return true; }
-
-struct tag { };
-
 void run() {
    // test with only one template parameter
    TEST_T(void, false);
@@ -141,7 +96,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -161,7 +116,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, 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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,57 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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,RET>::value), RESULT)
+#include "has_prefix_operator_test.hpp"
 
 namespace {
 
-struct ret { };
-
-struct without { };
-
-struct internal { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct external { };
-ret operator BOOST_TT_TRAIT_OP (const external&);
-
-class internal_private { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct returns_int { int operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void { void operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_double { double operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_string { std::string operator BOOST_TT_TRAIT_OP (); };
-
-//struct convertible_to_bool { operator bool () const; };
-//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (); };
-
-class Base1 { };
-class Derived1 : public Base1 { };
-
-bool operator BOOST_TT_TRAIT_OP (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&) { return true; }
-
-struct tag { };
-
 void run() {
    // test with only one template parameter
    TEST_T(void, false);
@@ -141,7 +96,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -161,7 +116,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, 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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,57 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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,RET>::value), RESULT)
+#include "has_prefix_operator_test.hpp"
 
 namespace {
 
-struct ret { };
-
-struct without { };
-
-struct internal { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct external { };
-ret operator BOOST_TT_TRAIT_OP (const external&);
-
-class internal_private { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct returns_int { int operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void { void operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_double { double operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_string { std::string operator BOOST_TT_TRAIT_OP (); };
-
-//struct convertible_to_bool { operator bool () const; };
-//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (); };
-
-class Base1 { };
-class Derived1 : public Base1 { };
-
-bool operator BOOST_TT_TRAIT_OP (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&) { return true; }
-
-struct tag { };
-
 void run() {
    // test with only one template parameter
    TEST_T(void, false);
@@ -141,7 +96,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -161,7 +116,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);

Added: sandbox/type_traits/libs/type_traits/test/has_prefix_operator_test.hpp
==============================================================================
--- (empty file)
+++ sandbox/type_traits/libs/type_traits/test/has_prefix_operator_test.hpp 2011-02-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -0,0 +1,53 @@
+// (C) Copyright Frederic Bron 2009-2011.
+// 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 <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,RET>::value), RESULT)
+
+namespace {
+
+struct ret { };
+
+struct without { };
+
+struct internal { ret operator BOOST_TT_TRAIT_OP () const; };
+
+struct external { };
+ret operator BOOST_TT_TRAIT_OP (const external&);
+
+class internal_private { ret operator BOOST_TT_TRAIT_OP () const; };
+
+struct returns_int { int operator BOOST_TT_TRAIT_OP (); };
+
+struct returns_void { void operator BOOST_TT_TRAIT_OP (); };
+
+struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); };
+
+struct returns_double { double operator BOOST_TT_TRAIT_OP (); };
+
+struct returns_string { std::string operator BOOST_TT_TRAIT_OP (); };
+
+struct convertible_to_bool { operator bool () const; };
+struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (); };
+
+class Base1 { };
+class Derived1 : public Base1 { };
+
+bool operator BOOST_TT_TRAIT_OP (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&) { return true; }
+
+struct tag { };
+
+}

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-27 16:07:13 EST (Sun, 27 Feb 2011)
@@ -1,57 +1,12 @@
-// (C) Copyright Frederic Bron 2009-2010.
+// (C) Copyright Frederic Bron 2009-2011.
 // 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,RET>::value), RESULT)
+#include "has_prefix_operator_test.hpp"
 
 namespace {
 
-struct ret { };
-
-struct without { };
-
-struct internal { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct external { };
-ret operator BOOST_TT_TRAIT_OP (const external&);
-
-class internal_private { ret operator BOOST_TT_TRAIT_OP () const; };
-
-struct returns_int { int operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void { void operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_double { double operator BOOST_TT_TRAIT_OP (); };
-
-struct returns_string { std::string operator BOOST_TT_TRAIT_OP (); };
-
-//struct convertible_to_bool { operator bool () const; };
-//struct returns_convertible_to_bool { convertible_to_bool operator BOOST_TT_TRAIT_OP (); };
-
-class Base1 { };
-class Derived1 : public Base1 { };
-
-bool operator BOOST_TT_TRAIT_OP (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&) { return true; }
-
-struct tag { };
-
 void run() {
    // test with only one template parameter
    TEST_T(void, false);
@@ -141,7 +96,7 @@
    TEST_T(returns_void_star, true);
    TEST_T(returns_double, true);
    TEST_T(returns_string, true);
-// TEST_T(convertible_to_bool, true);
+ TEST_T(returns_convertible_to_bool, true);
    TEST_T(Base1, true);
    TEST_T(Derived1, true);
    TEST_T(Base2, false);
@@ -161,7 +116,7 @@
    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(returns_convertible_to_bool, bool, true);
    TEST_TR(Base1, bool, true);
    TEST_TR(Derived1, bool, true);
    TEST_TR(Base2, bool, false);


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