Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70712 - sandbox/opaque/boost/opaque/meta_mixin
From: vicente.botet_at_[hidden]
Date: 2011-03-29 17:27:07


Author: viboes
Date: 2011-03-29 17:27:06 EDT (Tue, 29 Mar 2011)
New Revision: 70712
URL: http://svn.boost.org/trac/boost/changeset/70712

Log:
Opaque: Added more 2 combined macros
Text files modified:
   sandbox/opaque/boost/opaque/meta_mixin/combined_operators.hpp | 472 ++++++++++++++++++++++++++-------------
   sandbox/opaque/boost/opaque/meta_mixin/inherited_from_underlying.hpp | 8
   2 files changed, 322 insertions(+), 158 deletions(-)

Modified: sandbox/opaque/boost/opaque/meta_mixin/combined_operators.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/meta_mixin/combined_operators.hpp (original)
+++ sandbox/opaque/boost/opaque/meta_mixin/combined_operators.hpp 2011-03-29 17:27:06 EDT (Tue, 29 Mar 2011)
@@ -35,141 +35,239 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_EQUALITY_COMPARABLE1(Final,Bool) \
+#define BOOST_OPAQUE_USING_EQUALITY_COMPARABLE(Final,Bool) \
         BOOST_OPAQUE_USING_EQUAL(Final,Bool) \
         BOOST_OPAQUE_USING_NOT_EQUAL(Final,Bool)
 
     template <typename Bool=bool>
- struct using_equality_comparable1 {
+ struct using_equality_comparable {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_EQUALITY_COMPARABLE1(Final,Bool)
+ BOOST_OPAQUE_USING_EQUALITY_COMPARABLE(Final,Bool)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_LESS_THAN_COMPARABLE1(Final,Bool) \
+#define BOOST_OPAQUE_USING_LESS_THAN_COMPARABLE(Final,Bool) \
         BOOST_OPAQUE_USING_LESS_THAN(Final,Bool) \
         BOOST_OPAQUE_USING_LESS_THAN_EQUAL(Final,Bool) \
         BOOST_OPAQUE_USING_GREATER_THAN(Final,Bool) \
         BOOST_OPAQUE_USING_GREATER_THAN_EQUAL(Final,Bool)
 
     template <typename Bool=bool>
- struct using_less_than_comparable1 {
+ struct using_less_than_comparable {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_LESS_THAN_COMPARABLE1(Final,Bool)
+ BOOST_OPAQUE_USING_LESS_THAN_COMPARABLE(Final,Bool)
+ };
+ };
+
+#define BOOST_OPAQUE_USING_LESS_THAN_COMPARABLE2(Final, U, Bool) \
+ BOOST_OPAQUE_USING_LESS_THAN2(Final, U,Bool) \
+ BOOST_OPAQUE_USING_LESS_THAN_EQUAL2(Final, U,Bool) \
+ BOOST_OPAQUE_USING_GREATER_THAN2(Final, U,Bool) \
+ BOOST_OPAQUE_USING_GREATER_THAN_EQUAL2(Final, U,Bool)
+
+ template <typename U, typename Bool=bool>
+ struct using_less_than_comparable2 {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_LESS_THAN_COMPARABLE2(Final, U, Bool)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_ADDABLE1(Final) \
+#define BOOST_OPAQUE_USING_ADDABLE(Final) \
         BOOST_OPAQUE_USING_PLUS_ASSIGN(Final) \
         BOOST_OPAQUE_USING_PLUS(Final)
 
- struct using_addable1 {
+ struct using_addable {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_ADDABLE(Final)
+ };
+ };
+
+#define BOOST_OPAQUE_USING_ADDABLE2(Final,U) \
+ BOOST_OPAQUE_USING_PLUS_ASSIGN(Final) \
+ BOOST_OPAQUE_USING_PLUS2(Final,U)
+
+ template <typename U>
+ struct using_addable2 {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_ADDABLE1(Final)
+ BOOST_OPAQUE_USING_ADDABLE2(Final, U)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_SUBTRACTABLE1(Final) \
+#define BOOST_OPAQUE_USING_SUBTRACTABLE(Final) \
         BOOST_OPAQUE_USING_MINUS_ASSIGN(Final) \
         BOOST_OPAQUE_USING_MINUS(Final)
 
- struct using_subtractable1 {
+ struct using_subtractable {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_SUBTRACTABLE1(Final)
+ BOOST_OPAQUE_USING_SUBTRACTABLE(Final)
+ };
+ };
+
+#define BOOST_OPAQUE_USING_SUBTRACTABLE2(Final, U) \
+ BOOST_OPAQUE_USING_MINUS_ASSIGN(Final) \
+ BOOST_OPAQUE_USING_MINUS2(Final, U)
+
+ template <typename U>
+ struct using_subtractable2 {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_SUBTRACTABLE2(Final, U)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_MULTIPLIABLE1(Final) \
+#define BOOST_OPAQUE_USING_MULTIPLIABLE(Final) \
         BOOST_OPAQUE_USING_MULTIPLY_ASSIGN(Final) \
         BOOST_OPAQUE_USING_MULTIPLY(Final)
 
- struct using_multipliable1 {
+ struct using_multipliable {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_MULTIPLIABLE(Final)
+ };
+ };
+
+#define BOOST_OPAQUE_USING_MULTIPLIABLE2(Final, U) \
+ BOOST_OPAQUE_USING_MULTIPLY_ASSIGN(Final) \
+ BOOST_OPAQUE_USING_MULTIPLY2(Final, U)
+
+ template <typename U>
+ struct using_multipliable2 {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_MULTIPLIABLE1(Final)
+ BOOST_OPAQUE_USING_MULTIPLIABLE2(Final, U)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_DIVIDABLE1(Final) \
+#define BOOST_OPAQUE_USING_DIVIDABLE(Final) \
         BOOST_OPAQUE_USING_DIVIDE_ASSIGN(Final) \
         BOOST_OPAQUE_USING_DIVIDE(Final)
 
- struct using_dividable1 {
+ struct using_dividable {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_DIVIDABLE1(Final)
+ BOOST_OPAQUE_USING_DIVIDABLE(Final)
+ };
+ };
+
+#define BOOST_OPAQUE_USING_DIVIDABLE2(Final, U) \
+ BOOST_OPAQUE_USING_DIVIDE_ASSIGN(Final) \
+ BOOST_OPAQUE_USING_DIVIDE2(Final, U)
+
+ template <typename U>
+ struct using_dividable2 {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_DIVIDABLE2(Final, U)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_MODABLE1(Final) \
+#define BOOST_OPAQUE_USING_MODABLE(Final) \
         BOOST_OPAQUE_USING_MODULUS_ASSIGN(Final) \
         BOOST_OPAQUE_USING_MODULUS(Final)
 
- struct using_modable1 {
+ struct using_modable {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_MODABLE1(Final)
+ BOOST_OPAQUE_USING_MODABLE(Final)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_BITWISE_XORABLE1(Final) \
+#define BOOST_OPAQUE_USING_BITWISE_XORABLE(Final) \
         BOOST_OPAQUE_USING_BITWISE_XOR_ASSIGN(Final) \
         BOOST_OPAQUE_USING_BITWISE_XOR(Final)
 
- struct using_bitwise_xorable1 {
+ struct using_bitwise_xorable {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_BITWISE_XORABLE(Final)
+ };
+ };
+
+#define BOOST_OPAQUE_USING_BITWISE_XORABLE2(Final, U) \
+ BOOST_OPAQUE_USING_BITWISE_XOR_ASSIGN(Final) \
+ BOOST_OPAQUE_USING_BITWISE_XOR2(Final, U)
+
+ template <typename U>
+ struct using_bitwise_xorable2 {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_BITWISE_XORABLE1(Final)
+ BOOST_OPAQUE_USING_BITWISE_XORABLE2(Final, U)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_BITWISE_ANDABLE1(Final) \
+#define BOOST_OPAQUE_USING_BITWISE_ANDABLE(Final) \
         BOOST_OPAQUE_USING_BITWISE_AND_ASSIGN(Final) \
         BOOST_OPAQUE_USING_BITWISE_AND(Final)
 
- struct using_bitwise_andable1 {
+ struct using_bitwise_andable {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_BITWISE_ANDABLE1(Final)
+ BOOST_OPAQUE_USING_BITWISE_ANDABLE(Final)
+ };
+ };
+
+#define BOOST_OPAQUE_USING_BITWISE_ANDABLE2(Final, U) \
+ BOOST_OPAQUE_USING_BITWISE_AND_ASSIGN(Final) \
+ BOOST_OPAQUE_USING_BITWISE_AND2(Final, U)
+
+ template <typename U>
+ struct using_bitwise_andable2 {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_BITWISE_ANDABLE2(Final, U)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_BITWISE_ORABLE1(Final) \
+#define BOOST_OPAQUE_USING_BITWISE_ORABLE(Final) \
         BOOST_OPAQUE_USING_BITWISE_OR_ASSIGN(Final) \
         BOOST_OPAQUE_USING_BITWISE_OR(Final)
 
- struct using_bitwise_orable1 {
+ struct using_bitwise_orable {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_BITWISE_ORABLE(Final)
+ };
+ };
+
+#define BOOST_OPAQUE_USING_BITWISE_ORABLE2(Final, U) \
+ BOOST_OPAQUE_USING_BITWISE_OR_ASSIGN(Final) \
+ BOOST_OPAQUE_USING_BITWISE_OR2(Final, U)
+
+ template <typename U>
+ struct using_bitwise_orable2 {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_BITWISE_ORABLE1(Final)
+ BOOST_OPAQUE_USING_BITWISE_ORABLE2(Final, U)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_INCREMENTABLE(Final) \
+#define BOOST_OPAQUE_USING_INCREMENTABLE(Final) \
         BOOST_OPAQUE_USING_PRE_INCREMENT(Final) \
         BOOST_OPAQUE_USING_POST_INCREMENT(Final)
 
@@ -177,13 +275,13 @@
         template <typename Final, typename Base>
         struct type : Base
         {
- BOOST_OPAQUE_INCREMENTABLE(Final)
+ BOOST_OPAQUE_USING_INCREMENTABLE(Final)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_DECREMENTABLE(Final) \
+#define BOOST_OPAQUE_USING_DECREMENTABLE(Final) \
         BOOST_OPAQUE_USING_PRE_DECREMENT(Final) \
         BOOST_OPAQUE_USING_POST_DECREMENT(Final)
 
@@ -191,177 +289,189 @@
         template <typename Final, typename Base>
         struct type : Base
         {
- BOOST_OPAQUE_DECREMENTABLE(Final)
+ BOOST_OPAQUE_USING_DECREMENTABLE(Final)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_LEFT_SHIFTABLE1(Final) \
+#define BOOST_OPAQUE_USING_LEFT_SHIFTABLE(Final) \
         BOOST_OPAQUE_USING_LEFT_SHIFT_ASSIGN(Final) \
         BOOST_OPAQUE_USING_LEFT_SHIFT(Final)
 
- struct using_left_shiftable1 {
+ struct using_left_shiftable {
         template <typename Final, typename Base>
         struct type : Base
         {
- BOOST_OPAQUE_LEFT_SHIFTABLE1(Final)
+ BOOST_OPAQUE_USING_LEFT_SHIFTABLE(Final)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_RIGHT_SHIFTABLE1(Final) \
+#define BOOST_OPAQUE_USING_RIGHT_SHIFTABLE(Final) \
         BOOST_OPAQUE_USING_RIGHT_SHIFT_ASSIGN(Final) \
         BOOST_OPAQUE_USING_RIGHT_SHIFT(Final)
 
- struct using_right_shiftable1 {
+ struct using_right_shiftable {
         template <typename Final, typename Base>
         struct type : Base
         {
- BOOST_OPAQUE_RIGHT_SHIFTABLE1(Final)
+ BOOST_OPAQUE_USING_RIGHT_SHIFTABLE(Final)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_PARTIALLY_ORDERED1(Final,Bool) \
+#define BOOST_OPAQUE_USING_PARTIALLY_ORDERED(Final,Bool) \
         BOOST_OPAQUE_USING_LESS_THAN(Final,Bool) \
         BOOST_OPAQUE_USING_LESS_THAN_EQUAL(Final,Bool) \
         BOOST_OPAQUE_USING_GREATER_THAN(Final,Bool) \
         BOOST_OPAQUE_USING_GREATER_THAN_EQUAL(Final,Bool)
 
     template <typename Bool=bool>
- struct using_partially_ordered1 {
+ struct using_partially_ordered {
         template <typename Final, typename Base>
- struct type : boost::partially_ordered1<Final, Base > {
- BOOST_OPAQUE_USING_LESS_THAN(Final,Bool)
+ struct type : Base {
+ BOOST_OPAQUE_USING_PARTIALLY_ORDERED(Final,Bool)
         };
     };
 
 
 //////////////////////////////////////////////////////////////////////////////
 
-#define BOOST_OPAQUE_TOTALY_ORDERED1(Final,Bool) \
- BOOST_OPAQUE_EQUALITY_COMPARABLE1(Final,Bool) \
- BOOST_OPAQUE_LESS_THAN_COMPARABLE1(Final,Bool)
+#define BOOST_OPAQUE_USING_TOTALY_ORDERED(Final,Bool) \
+ BOOST_OPAQUE_USING_EQUALITY_COMPARABLE(Final,Bool) \
+ BOOST_OPAQUE_USING_LESS_THAN_COMPARABLE(Final,Bool)
 
     template <typename Bool=bool>
- struct using_totally_ordered1 {
+ struct using_totally_ordered {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_TOTALY_ORDERED1(Final,Bool)
+ BOOST_OPAQUE_USING_TOTALY_ORDERED(Final,Bool)
         };
     };
 
-//////////////////////////////////////////////////////////////////////////////
+#define BOOST_OPAQUE_USING_TOTALY_ORDERED2(Final, U, Bool) \
+ BOOST_OPAQUE_USING_EQUALITY_COMPARABLE(Final, Bool) \
+ BOOST_OPAQUE_USING_LESS_THAN_COMPARABLE2(Final, U, Bool)
 
- //~ template <class T, class U, typename Base = base_opaque_type >
- //~ struct additive2
- //~ : opaque::addable2<T, U
- //~ , opaque::subtractable2<T, U, Base
- //~ > > {};
+ template <typename U, typename Bool=bool>
+ struct using_totally_ordered2 {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_TOTALY_ORDERED2(Final, U, Bool)
+ };
+ };
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_ADDITIVE1(Final) \
- BOOST_OPAQUE_ADDABLE1(Final) \
- BOOST_OPAQUE_SUBTRACTABLE1(Final)
+ #define BOOST_OPAQUE_USING_ADDITIVE(Final) \
+ BOOST_OPAQUE_USING_ADDABLE(Final) \
+ BOOST_OPAQUE_USING_SUBTRACTABLE(Final)
 
- struct using_additive1 {
+ struct using_additive {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_ADDITIVE1(Final)
+ BOOST_OPAQUE_USING_ADDITIVE(Final)
         };
     };
 
-//////////////////////////////////////////////////////////////////////////////
+ #define BOOST_OPAQUE_USING_ADDITIVE2(Final, U) \
+ BOOST_OPAQUE_USING_ADDABLE2(Final, U) \
+ BOOST_OPAQUE_USING_SUBTRACTABLE2(Final, U)
+
+ template <typename U>
+ struct using_additive2 {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_ADDITIVE2(Final, U)
+ };
+ };
+
 
- //~ template <class T, class U, typename Base = base_opaque_type >
- //~ struct multiplicative2
- //~ : opaque::multipliable2<T, U
- //~ , opaque::dividable2<T, U, Base
- //~ > > {};
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_MULTIPLICATIVE1(Final) \
- BOOST_OPAQUE_MULTIPLIABLE1(Final) \
- BOOST_OPAQUE_DIVIDABLE1(Final)
+ #define BOOST_OPAQUE_USING_MULTIPLICATIVE(Final) \
+ BOOST_OPAQUE_USING_MULTIPLIABLE(Final) \
+ BOOST_OPAQUE_USING_DIVIDABLE(Final)
 
- struct using_multiplicative1 {
+ struct using_multiplicative {
         template <typename Final, typename Base>
         struct type : Base {
- BOOST_OPAQUE_MULTIPLICATIVE1(Final)
+ BOOST_OPAQUE_USING_MULTIPLICATIVE(Final)
         };
     };
 
-//////////////////////////////////////////////////////////////////////////////
+ #define BOOST_OPAQUE_USING_MULTIPLICATIVE2(Final, U) \
+ BOOST_OPAQUE_USING_MULTIPLIABLE2(Final, U) \
+ BOOST_OPAQUE_USING_DIVIDABLE2(Final, U)
 
- //~ template <class T, class U, typename Base = base_opaque_type >
- //~ struct integer_multiplicative2
- //~ : opaque::multiplicative2<T, U
- //~ , opaque::modable2<T, U, Base
- //~ > > {};
+ template <typename U>
+ struct using_multiplicative2 {
+ template <typename Final, typename Base>
+ struct type : Base {
+ BOOST_OPAQUE_USING_MULTIPLICATIVE2(Final, U)
+ };
+ };
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_INTEGER_MULTIPLICATIVE1(Final) \
- BOOST_OPAQUE_MULTIPLICATIVE1(Final) \
- BOOST_OPAQUE_MODABLE1(Final)
+ #define BOOST_OPAQUE_USING_INTEGER_MULTIPLICATIVE(Final) \
+ BOOST_OPAQUE_USING_MULTIPLICATIVE(Final) \
+ BOOST_OPAQUE_USING_MODABLE(Final)
 
- struct integer_multiplicative1
+ struct integer_multiplicative
     {
         template <typename Final, typename Base = base_opaque_type >
         struct type : Base
         {
- BOOST_OPAQUE_INTEGER_MULTIPLICATIVE1(Final)
+ BOOST_OPAQUE_USING_INTEGER_MULTIPLICATIVE(Final)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
- //~ template <class T, class U, typename Base = base_opaque_type >
- //~ struct arithmetic2
- //~ : opaque::additive2<T, U
- //~ , opaque::multiplicative2<T, U, Base
- //~ > > {};
+ #define BOOST_OPAQUE_USING_ARITHMETIC(Final) \
+ BOOST_OPAQUE_USING_ADDITIVE(Final) \
+ BOOST_OPAQUE_USING_MULTIPLICATIVE(Final)
 
-//////////////////////////////////////////////////////////////////////////////
-
- #define BOOST_OPAQUE_ARITHMETIC1(Final) \
- BOOST_OPAQUE_ADDITIVE1(Final) \
- BOOST_OPAQUE_MULTIPLICATIVE1(Final)
-
- struct using_arithmetic1
+ struct using_arithmetic
     {
         template <typename Final, typename Base = base_opaque_type >
         struct type : Base
         {
- BOOST_OPAQUE_ARITHMETIC1(Final)
+ BOOST_OPAQUE_USING_ARITHMETIC(Final)
         };
     };
 
-//////////////////////////////////////////////////////////////////////////////
+#define BOOST_OPAQUE_USING_ARITHMETIC2(Final, U) \
+ BOOST_OPAQUE_USING_ADDITIVE2(Final, U) \
+ BOOST_OPAQUE_USING_MULTIPLICATIVE2(Final, U)
 
- //~ template <class T, class U, typename Base = base_opaque_type >
- //~ struct integer_arithmetic2
- //~ : additive2<T, U
- //~ , integer_multiplicative2<T, U, Base
- //~ > > {};
+ template <typename U>
+struct using_arithmetic2
+{
+ template <typename Final, typename Base = base_opaque_type >
+ struct type : Base
+ {
+ BOOST_OPAQUE_USING_ARITHMETIC2(Final, U)
+ };
+};
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_INTEGER_ARITHMETIC1(Final) \
- BOOST_OPAQUE_ADDITIVE1(Final) \
- BOOST_OPAQUE_INTEGER_MULTIPLICATIVE1(Final)
+ #define BOOST_OPAQUE_USING_INTEGER_ARITHMETIC(Final) \
+ BOOST_OPAQUE_USING_ADDITIVE(Final) \
+ BOOST_OPAQUE_USING_INTEGER_MULTIPLICATIVE(Final)
 
     struct using_integer_arithmetic1
     {
         template <typename Final, typename Base = base_opaque_type >
         struct type : Base
         {
- BOOST_OPAQUE_INTEGER_ARITHMETIC1(Final)
+ BOOST_OPAQUE_USING_INTEGER_ARITHMETIC(Final)
         };
     };
 
@@ -376,32 +486,47 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_BITWISE1(Final) \
- BOOST_OPAQUE_BITWISE_XORABLE1(Final) \
- BOOST_OPAQUE_BITWISE_ANDABLE1(Final) \
- BOOST_OPAQUE_BITWISE_ORABLE1(Final)
+ #define BOOST_OPAQUE_USING_BITWISE(Final) \
+ BOOST_OPAQUE_USING_BITWISE_XORABLE(Final) \
+ BOOST_OPAQUE_USING_BITWISE_ANDABLE(Final) \
+ BOOST_OPAQUE_USING_BITWISE_ORABLE(Final)
 
- struct using_bitwise1
+ struct using_bitwise
     {
         template <typename Final, typename Base = base_opaque_type >
         struct type : Base
         {
- BOOST_OPAQUE_BITWISE1(Final)
+ BOOST_OPAQUE_USING_BITWISE(Final)
         };
     };
 
+#define BOOST_OPAQUE_USING_BITWISE2(Final, U) \
+ BOOST_OPAQUE_USING_BITWISE_XORABLE2(Final, U) \
+ BOOST_OPAQUE_USING_BITWISE_ANDABLE2(Final, U) \
+ BOOST_OPAQUE_USING_BITWISE_ORABLE2(Final, U)
+
+ template <typename U>
+struct using_bitwise2
+{
+ template <typename Final, typename Base = base_opaque_type >
+ struct type : Base
+ {
+ BOOST_OPAQUE_USING_BITWISE2(Final, U)
+ };
+};
+
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_UNIT_STEPABLE(Final) \
- BOOST_OPAQUE_INCREMENTABLE(Final) \
- BOOST_OPAQUE_DECREMENTABLE(Final)
+ #define BOOST_OPAQUE_USING_UNIT_STEPABLE(Final) \
+ BOOST_OPAQUE_USING_INCREMENTABLE(Final) \
+ BOOST_OPAQUE_USING_DECREMENTABLE(Final)
 
     struct using_unit_steppable
     {
         template <typename Final, typename Base = base_opaque_type >
         struct type : Base
         {
- BOOST_OPAQUE_UNIT_STEPABLE(Final)
+ BOOST_OPAQUE_USING_UNIT_STEPABLE(Final)
         };
     };
 
@@ -415,67 +540,79 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_SHIFTABLE1(Final) \
- BOOST_OPAQUE_LEFT_SHIFTABLE1(Final) \
- BOOST_OPAQUE_RIGHT_SHIFTABLE1(Final)
+ #define BOOST_OPAQUE_USING_SHIFTABLE(Final) \
+ BOOST_OPAQUE_USING_LEFT_SHIFTABLE(Final) \
+ BOOST_OPAQUE_USING_RIGHT_SHIFTABLE(Final)
 
     struct using_shiftable1
     {
         template <typename Final, typename Base = base_opaque_type >
         struct type : Base
         {
- BOOST_OPAQUE_SHIFTABLE1(Final)
+ BOOST_OPAQUE_USING_SHIFTABLE(Final)
         };
     };
 
 //////////////////////////////////////////////////////////////////////////////
 
- //~ template <class T, class U, typename Base = base_opaque_type >
- //~ struct ring_operators2
- //~ : opaque::additive2<T, U
- //~ , opaque::subtractable2_left<T, U
- //~ , opaque::multipliable2<T, U, Base
- //~ > > > {};
-
-//////////////////////////////////////////////////////////////////////////////
-
- #define BOOST_OPAQUE_RING1(Final) \
- BOOST_OPAQUE_ADDITIVE1(Final) \
- BOOST_OPAQUE_MULTIPLIABLE1(Final)
+ #define BOOST_OPAQUE_USING_RING_OPERATORS(Final) \
+ BOOST_OPAQUE_USING_ADDITIVE(Final) \
+ BOOST_OPAQUE_USING_MULTIPLIABLE(Final)
 
- struct using_ring_operators1
+ struct using_ring_operators
     {
         template <typename Final, typename Base = base_opaque_type >
         struct type: Base
         {
- BOOST_OPAQUE_RING1(Final)
+ BOOST_OPAQUE_USING_RING_OPERATORS(Final)
         };
     };
 
-//////////////////////////////////////////////////////////////////////////////
+#define BOOST_OPAQUE_USING_RING_OPERATORS2(Final, U) \
+ BOOST_OPAQUE_USING_ADDITIVE2(Final, U) \
+ BOOST_OPAQUE_USING_MULTIPLIABLE2(Final, U)
+
+ template <typename U>
+struct using_ring_operators2
+{
+ template <typename Final, typename Base = base_opaque_type >
+ struct type: Base
+ {
+ BOOST_OPAQUE_USING_RING_OPERATORS2(Final, U)
+ };
+};
 
- //~ template <class T, class U, typename Base = base_opaque_type >
- //~ struct ordered_ring_operators2
- //~ : opaque::ring_operators2<T, U
- //~ , opaque::totally_ordered2<T, U, Base
- //~ > > {};
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_ORDERED_RING1(Final, Bool) \
- BOOST_OPAQUE_RING1(Final) \
- BOOST_OPAQUE_TOTALY_ORDERED1(Final,Bool)
+ #define BOOST_OPAQUE_USING_ORDERED_RING_OPERATORS(Final, Bool) \
+ BOOST_OPAQUE_USING_RING_OPERATORS(Final) \
+ BOOST_OPAQUE_USING_TOTALY_ORDERED(Final,Bool)
 
     template <typename Bool=bool>
- struct using_ordered_ring_operators1
+ struct using_ordered_ring_operators
     {
         template <typename Final, typename Base = base_opaque_type>
         struct type : Base
         {
- BOOST_OPAQUE_ORDERED_RING1(Final,Bool)
+ BOOST_OPAQUE_USING_ORDERED_RING_OPERATORS(Final,Bool)
         };
     };
 
+#define BOOST_OPAQUE_USING_ORDERED_RING_OPERATORS2(Final, U, Bool) \
+ BOOST_OPAQUE_USING_RING_OPERATORS2(Final, U) \
+ BOOST_OPAQUE_USING_TOTALY_ORDERED2(Final, U,Bool)
+
+template <typename U, typename Bool=bool>
+struct using_ordered_ring_operators2
+{
+ template <typename Final, typename Base = base_opaque_type>
+ struct type : Base
+ {
+ BOOST_OPAQUE_USING_ORDERED_RING_OPERATORS2(Final, U,Bool)
+ };
+};
+
 //////////////////////////////////////////////////////////////////////////////
 
     //~ template <class T, class U, typename Base = base_opaque_type >
@@ -487,19 +624,32 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_FIELD1(Final) \
- BOOST_OPAQUE_RING1(Final) \
- BOOST_OPAQUE_DIVIDABLE1(Final)
+ #define BOOST_OPAQUE_USING_FIELD_OPERATORS(Final) \
+ BOOST_OPAQUE_USING_RING_OPERATORS(Final) \
+ BOOST_OPAQUE_USING_DIVIDABLE(Final)
 
- struct using_field_operators1
+ struct using_field_operators
     {
         template <typename Final, typename Base = base_opaque_type>
         struct type: Base
         {
- BOOST_OPAQUE_FIELD1(Final)
+ BOOST_OPAQUE_USING_FIELD_OPERATORS(Final)
         };
     };
 
+#define BOOST_OPAQUE_USING_FIELD_OPERATORS2(Final, U) \
+ BOOST_OPAQUE_USING_RING_OPERATORS2(Final, U) \
+ BOOST_OPAQUE_USING_DIVIDABLE2(Final, U)
+
+ template <typename U>
+ struct using_field_operators2
+ {
+ template <typename Final, typename Base = base_opaque_type>
+ struct type: Base
+ {
+ BOOST_OPAQUE_USING_FIELD_OPERATORS2(Final, U)
+ };
+ };
 //////////////////////////////////////////////////////////////////////////////
 
     //~ template <class T, class U, typename Base = base_opaque_type >
@@ -510,20 +660,34 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
- #define BOOST_OPAQUE_ORDERED_FIELD1(Final, Bool) \
- BOOST_OPAQUE_FIELD1(Final) \
- BOOST_OPAQUE_TOTALY_ORDERED1(Final,Bool)
+ #define BOOST_OPAQUE_USING_ORDERED_FIELD_OPERATORS(Final, Bool) \
+ BOOST_OPAQUE_USING_FIELD_OPERATORS(Final) \
+ BOOST_OPAQUE_USING_TOTALY_ORDERED(Final,Bool)
 
     template <typename Bool=bool>
- struct using_ordered_field_operators1
+ struct using_ordered_field_operators
     {
         template <typename Final, typename Base = base_opaque_type>
         struct type : Base
         {
- BOOST_OPAQUE_ORDERED_FIELD1(Final,Bool)
+ BOOST_OPAQUE_USING_ORDERED_FIELD_OPERATORS(Final,Bool)
         };
     };
 
+#define BOOST_OPAQUE_USING_ORDERED_FIELD_OPERATORS2(Final, U, Bool) \
+ BOOST_OPAQUE_USING_FIELD_OPERATORS2(Final, U) \
+ BOOST_OPAQUE_USING_TOTALY_ORDERED2(Final, U, Bool)
+
+template <typename U, typename Bool=bool>
+struct using_ordered_field_operators2
+{
+ template <typename Final, typename Base = base_opaque_type>
+ struct type : Base
+ {
+ BOOST_OPAQUE_USING_ORDERED_FIELD_OPERATORS2(Final, U, Bool)
+ };
+};
+
 }
 }
 

Modified: sandbox/opaque/boost/opaque/meta_mixin/inherited_from_underlying.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/meta_mixin/inherited_from_underlying.hpp (original)
+++ sandbox/opaque/boost/opaque/meta_mixin/inherited_from_underlying.hpp 2011-03-29 17:27:06 EDT (Tue, 29 Mar 2011)
@@ -42,10 +42,10 @@
       template <typename Final, typename Base>
       struct type : Base
       {
- BOOST_OPAQUE_TOTALY_ORDERED1(Final,Bool)
- BOOST_OPAQUE_INTEGER_ARITHMETIC1(Final)
- BOOST_OPAQUE_BITWISE1(Final)
- BOOST_OPAQUE_UNIT_STEPABLE(Final)
+ BOOST_OPAQUE_USING_TOTALY_ORDERED(Final,Bool)
+ BOOST_OPAQUE_USING_INTEGER_ARITHMETIC(Final)
+ BOOST_OPAQUE_USING_BITWISE(Final)
+ BOOST_OPAQUE_USING_UNIT_STEPABLE(Final)
         BOOST_OPAQUE_USING_UNARY_PLUS(Final)
         BOOST_OPAQUE_USING_UNARY_MINUS(Final)
       };


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