Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65728 - trunk/boost/fusion/adapted/adt/detail
From: mr.chr.schmidt_at_[hidden]
Date: 2010-10-02 14:39:24


Author: cschmidt
Date: 2010-10-02 14:39:23 EDT (Sat, 02 Oct 2010)
New Revision: 65728
URL: http://svn.boost.org/trac/boost/changeset/65728

Log:
Fusion: added adt_attribute_proxy-getter
Text files modified:
   trunk/boost/fusion/adapted/adt/detail/adapt_base.hpp | 16 +++++++++++++---
   1 files changed, 13 insertions(+), 3 deletions(-)

Modified: trunk/boost/fusion/adapted/adt/detail/adapt_base.hpp
==============================================================================
--- trunk/boost/fusion/adapted/adt/detail/adapt_base.hpp (original)
+++ trunk/boost/fusion/adapted/adt/detail/adapt_base.hpp 2010-10-02 14:39:23 EDT (Sat, 02 Oct 2010)
@@ -25,7 +25,7 @@
 #define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL( \
     TEMPLATE_PARAMS_SEQ) \
                                                                                 \
- lvalue
+ remove_const<remove_reference<T>::type>::type
 
 #define BOOST_FUSION_ADAPT_ADT_C_BASE( \
     TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \
@@ -79,7 +79,7 @@
           : obj(o) \
         {} \
                                                                                 \
- operator type() const \
+ type get() const \
         { \
             return access::adt_attribute_access< \
                 BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
@@ -87,6 +87,11 @@
>::boost_fusion_adapt_adt_impl_get(*obj); \
         } \
                                                                                 \
+ operator type() const \
+ { \
+ return get(); \
+ } \
+ \
         BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const* obj; \
     }; \
                                                                                 \
@@ -118,7 +123,7 @@
             return *this; \
         } \
                                                                                 \
- operator type() const \
+ type get() const \
         { \
             return access::adt_attribute_access< \
                 BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
@@ -126,6 +131,11 @@
>::boost_fusion_adapt_adt_impl_get(*obj); \
         } \
                                                                                 \
+ operator type() const \
+ { \
+ return get(); \
+ } \
+ \
         BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)* obj; \
     }; \
                                                                                 \


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