Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61675 - trunk/boost/proto
From: eric_at_[hidden]
Date: 2010-04-29 09:59:13


Author: eric_niebler
Date: 2010-04-29 09:59:12 EDT (Thu, 29 Apr 2010)
New Revision: 61675
URL: http://svn.boost.org/trac/boost/changeset/61675

Log:
allow virtual members to be in a different domain than their enclosing class
Text files modified:
   trunk/boost/proto/extends.hpp | 14 ++++++++++----
   1 files changed, 10 insertions(+), 4 deletions(-)

Modified: trunk/boost/proto/extends.hpp
==============================================================================
--- trunk/boost/proto/extends.hpp (original)
+++ trunk/boost/proto/extends.hpp 2010-04-29 09:59:12 EDT (Thu, 29 Apr 2010)
@@ -612,24 +612,30 @@
 
         /// INTERNAL ONLY
         ///
- #define BOOST_PROTO_EXTENDS_MEMBER_(R, DATA, ELEM) \
+ #define BOOST_PROTO_EXTENDS_MEMBER_(R, DOMAIN, ELEM) \
             boost::proto::exprns_::virtual_member< \
                 proto_derived_expr \
               , BOOST_PP_TUPLE_ELEM(2, 0, ELEM) \
- , proto_domain \
+ , DOMAIN \
> BOOST_PP_TUPLE_ELEM(2, 1, ELEM); \
             /**/
 
         /// \brief For declaring virtual data members in an extension class.
         ///
- #define BOOST_PROTO_EXTENDS_MEMBERS(SEQ) \
+ #define BOOST_PROTO_EXTENDS_MEMBERS_WITH_DOMAIN(SEQ, DOMAIN) \
             union \
             { \
                 char proto_member_union_start_; \
- BOOST_PP_SEQ_FOR_EACH(BOOST_PROTO_EXTENDS_MEMBER_, ~, SEQ) \
+ BOOST_PP_SEQ_FOR_EACH(BOOST_PROTO_EXTENDS_MEMBER_, DOMAIN, SEQ) \
             }; \
             /**/
 
+ /// \brief For declaring virtual data members in an extension class.
+ ///
+ #define BOOST_PROTO_EXTENDS_MEMBERS(SEQ) \
+ BOOST_PROTO_EXTENDS_MEMBERS_WITH_DOMAIN(SEQ, proto_domain) \
+ /**/
+
     }
 
 }}


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