Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65613 - sandbox/opaque/boost/opaque
From: vicente.botet_at_[hidden]
Date: 2010-09-26 16:46:36


Author: viboes
Date: 2010-09-26 16:46:34 EDT (Sun, 26 Sep 2010)
New Revision: 65613
URL: http://svn.boost.org/trac/boost/changeset/65613

Log:
Opaque: Add Concepts parameters to all the classes

Text files modified:
   sandbox/opaque/boost/opaque/macros.hpp | 4 ++--
   sandbox/opaque/boost/opaque/new_class.hpp | 10 ++++++----
   sandbox/opaque/boost/opaque/private_opaque_class.hpp | 6 +++---
   sandbox/opaque/boost/opaque/private_opaque_type.hpp | 17 ++++++++---------
   sandbox/opaque/boost/opaque/public_opaque_class.hpp | 6 +++---
   sandbox/opaque/boost/opaque/public_opaque_type.hpp | 19 +++++++++----------
   6 files changed, 31 insertions(+), 31 deletions(-)

Modified: sandbox/opaque/boost/opaque/macros.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/macros.hpp (original)
+++ sandbox/opaque/boost/opaque/macros.hpp 2010-09-26 16:46:34 EDT (Sun, 26 Sep 2010)
@@ -33,7 +33,7 @@
     BOOST_OPAQUE_PUBLIC_FORWARD_CONSTRUCTORS(UT,OT)\
 
 
-#if 1
+#if 0
 #define BOOST_OPAQUE_PUBLIC_TYPEDEF(UT, OT) \
 struct OT: boost::public_opaque_class<OT, UT> \
 {\
@@ -64,7 +64,7 @@
 
 
 
-#if 1
+#if 0
 #define BOOST_OPAQUE_PRIVATE_TYPEDEF(UT, OT) \
 struct OT: boost::private_opaque_class<OT, UT> \
 {\

Modified: sandbox/opaque/boost/opaque/new_class.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/new_class.hpp (original)
+++ sandbox/opaque/boost/opaque/new_class.hpp 2010-09-26 16:46:34 EDT (Sun, 26 Sep 2010)
@@ -17,8 +17,10 @@
 
 namespace boost {
 
- template <typename Final, typename T, typename Base=base_new_type >
- class new_class : public Base
+ template <typename Final, typename T, typename Concepts=boost::mpl::vector0<>, typename Base=base_new_type >
+ class new_class : public
+ //~ Base
+ boost::mpl::fold<Concepts, Base, detail::inherit<Final, T> >::type
     {
     public:
         typedef T underlying_type;
@@ -63,8 +65,8 @@
 
     };
 
- template <typename T, typename Final, typename UT, typename Base >
- T opaque_static_cast(new_class<Final, UT, Base> const& v)
+ template <typename T, typename Final, typename UT, typename Concepts, typename Base >
+ T opaque_static_cast(new_class<Final, UT, Concepts, Base> const& v)
     {
         return static_cast<T>(v.underlying());
     }

Modified: sandbox/opaque/boost/opaque/private_opaque_class.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/private_opaque_class.hpp (original)
+++ sandbox/opaque/boost/opaque/private_opaque_class.hpp 2010-09-26 16:46:34 EDT (Sun, 26 Sep 2010)
@@ -23,16 +23,16 @@
 namespace boost {
 
         
- template <typename Final, typename T, typename Base=base_private_opaque_type>
+ template <typename Final, typename T, typename Concepts=boost::mpl::vector0<>, typename Base=base_private_opaque_type>
     class private_opaque_class : public
- new_class< Final, T,
+ new_class< Final, T, Concepts,
                 transitive_explicit_substituable<Final, T,
                     typename inherited_from_undelying<T>::template type<Final, T, Base>
>
>
     {
         typedef
- new_class< Final, T,
+ new_class< Final, T, Concepts,
                 transitive_explicit_substituable<Final, T,
                     typename inherited_from_undelying<T>::template type<Final, T, Base>
>

Modified: sandbox/opaque/boost/opaque/private_opaque_type.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/private_opaque_type.hpp (original)
+++ sandbox/opaque/boost/opaque/private_opaque_type.hpp 2010-09-26 16:46:34 EDT (Sun, 26 Sep 2010)
@@ -14,6 +14,7 @@
 #define BOOST_OPAQUE_PRIVATE_OPAQUE_TYPE_HPP
 
 #include <boost/opaque/combined_operators.hpp>
+#include <boost/opaque/new_type.hpp>
 #include <boost/opaque/new_class.hpp>
 
 #include <boost/type_traits/is_class.hpp>
@@ -55,20 +56,18 @@
     };
 #endif
         
- template <typename T, typename Base=base_private_opaque_type, typename Tag=void>
+ template <typename T, typename Tag=void, typename Concepts=boost::mpl::vector0<>, typename Base=base_private_opaque_type>
     class private_opaque_type : public
- new_class< private_opaque_type<T,Base,Tag >, T,
- transitive_explicit_substituable<private_opaque_type<T,Base,Tag >, T,
- //~ typename inherited_from_undelying<T, private_opaque_type<T,Base,Tag>, Base>::type
- typename inherited_from_undelying<T>::template type<private_opaque_type<T,Base,Tag>, T, Base>
+ new_class< private_opaque_type<T,Tag,Concepts,Base>, T, Concepts,
+ transitive_explicit_substituable<private_opaque_type<T,Tag,Concepts,Base >, T,
+ typename inherited_from_undelying<T>::template type<private_opaque_type<T,Tag,Concepts,Base>, T, Base>
>
>
     {
         typedef
- new_class< private_opaque_type<T,Base,Tag >, T,
- transitive_explicit_substituable<private_opaque_type<T,Base,Tag >, T,
- //~ typename inherited_from_undelying<T, private_opaque_type<T,Base,Tag >, Base>::type
- typename inherited_from_undelying<T>::template type<private_opaque_type<T,Base,Tag>, T, Base>
+ new_class< private_opaque_type<T,Tag,Concepts,Base>, T, Concepts,
+ transitive_explicit_substituable<private_opaque_type<T,Tag,Concepts,Base>, T,
+ typename inherited_from_undelying<T>::template type<private_opaque_type<T,Tag,Concepts,Base>, T, Base>
>
>
         base_type;

Modified: sandbox/opaque/boost/opaque/public_opaque_class.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/public_opaque_class.hpp (original)
+++ sandbox/opaque/boost/opaque/public_opaque_class.hpp 2010-09-26 16:46:34 EDT (Sun, 26 Sep 2010)
@@ -25,10 +25,10 @@
 namespace boost {
 
 
- template <typename Final, typename T, typename Base=base_public_opaque_type>
+ template <typename Final, typename T, typename Concepts=boost::mpl::vector0<>, typename Base=base_public_opaque_type>
     class public_opaque_class
         : public
- new_class< Final, T,
+ new_class< Final, T, Concepts,
                 transitive_substituable<Final, T,
                     typename inherited_from_undelying<T>::template type<Final, T, Base>
>
@@ -36,7 +36,7 @@
 
     {
         typedef
- new_class< Final, T,
+ new_class< Final, T, Concepts,
                 transitive_substituable<Final, T,
                     typename inherited_from_undelying<T>::template type<Final, T, Base>
>

Modified: sandbox/opaque/boost/opaque/public_opaque_type.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/public_opaque_type.hpp (original)
+++ sandbox/opaque/boost/opaque/public_opaque_type.hpp 2010-09-26 16:46:34 EDT (Sun, 26 Sep 2010)
@@ -66,26 +66,25 @@
         }
     };
 
- template <typename T, typename Base=base_public_opaque_type, typename Tag=void>
+
+ template <typename T, typename Tag=void, typename Concepts=boost::mpl::vector0<>, typename Base=base_public_opaque_type>
     class public_opaque_type
         : public
- new_class< public_opaque_type<T,Base,Tag >, T,
- transitive_substituable<public_opaque_type<T,Base,Tag >, T,
- //~ typename inherited_from_undelying<T, public_opaque_type<T,Base,Tag >, Base>::type
- typename inherited_from_undelying<T>::template type<public_opaque_type<T,Base,Tag>, T, Base>
+ new_class< public_opaque_type<T,Tag,Concepts,Base>, T, Concepts,
+ transitive_substituable<public_opaque_type<T,Tag,Concepts,Base>, T,
+ typename inherited_from_undelying<T>::template type<public_opaque_type<T,Tag,Concepts,Base>, T, Base>
>
>
 
     {
         typedef
- new_class< public_opaque_type<T,Base,Tag >, T,
- transitive_substituable<public_opaque_type<T,Base,Tag >, T,
- //~ typename inherited_from_undelying<T, public_opaque_type<T,Base,Tag >, Base>::type
- typename inherited_from_undelying<T>::template type<public_opaque_type<T,Base,Tag>, T, Base>
+ new_class< public_opaque_type<T,Tag,Concepts,Base>, T, Concepts,
+ transitive_substituable<public_opaque_type<T,Tag,Concepts,Base>, T,
+ typename inherited_from_undelying<T>::template type<public_opaque_type<T,Tag,Concepts,Base>, T, Base>
>
>
         base_type;
-
+
     protected:
         typedef public_opaque_type opaque_type_t;
     public:


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