Fusion: added adt_attribute_proxy-getter

[SVN r65728]
This commit is contained in:
Christopher Schmidt
2010-10-02 18:39:23 +00:00
parent f723f870c7
commit 21d676dd87

View File

@ -25,7 +25,7 @@
#define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL( \ #define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL( \
TEMPLATE_PARAMS_SEQ) \ TEMPLATE_PARAMS_SEQ) \
\ \
lvalue remove_const<remove_reference<T>::type>::type
#define BOOST_FUSION_ADAPT_ADT_C_BASE( \ #define BOOST_FUSION_ADAPT_ADT_C_BASE( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \ TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \
@ -79,7 +79,7 @@
: obj(o) \ : obj(o) \
{} \ {} \
\ \
operator type() const \ type get() const \
{ \ { \
return access::adt_attribute_access< \ return access::adt_attribute_access< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
@ -87,6 +87,11 @@
>::boost_fusion_adapt_adt_impl_get(*obj); \ >::boost_fusion_adapt_adt_impl_get(*obj); \
} \ } \
\ \
operator type() const \
{ \
return get(); \
} \
\
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const* obj; \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const* obj; \
}; \ }; \
\ \
@ -118,7 +123,7 @@
return *this; \ return *this; \
} \ } \
\ \
operator type() const \ type get() const \
{ \ { \
return access::adt_attribute_access< \ return access::adt_attribute_access< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
@ -126,6 +131,11 @@
>::boost_fusion_adapt_adt_impl_get(*obj); \ >::boost_fusion_adapt_adt_impl_get(*obj); \
} \ } \
\ \
operator type() const \
{ \
return get(); \
} \
\
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)* obj; \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)* obj; \
}; \ }; \
\ \