Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65054 - trunk/boost/spirit/home/support
From: hartmut.kaiser_at_[hidden]
Date: 2010-08-27 11:07:20


Author: hkaiser
Date: 2010-08-27 11:07:05 EDT (Fri, 27 Aug 2010)
New Revision: 65054
URL: http://svn.boost.org/trac/boost/changeset/65054

Log:
Spirit: more fixes for ADAPT_CLASS
Text files modified:
   trunk/boost/spirit/home/support/adapt_class_attributes.hpp | 45 ++++++++++++++++++++++++----------------
   1 files changed, 27 insertions(+), 18 deletions(-)

Modified: trunk/boost/spirit/home/support/adapt_class_attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/adapt_class_attributes.hpp (original)
+++ trunk/boost/spirit/home/support/adapt_class_attributes.hpp 2010-08-27 11:07:05 EDT (Fri, 27 Aug 2010)
@@ -22,30 +22,36 @@
     ///////////////////////////////////////////////////////////////////////////
     template <typename T, int N>
     struct is_container<fusion::extension::access::class_member_proxy<T, N> >
- : is_container<typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
+ : is_container<
+ typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
     {};
 
     template <typename T, int N>
     struct container_value<fusion::extension::access::class_member_proxy<T, N> >
- : container_value<typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
+ : container_value<
+ typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
     {};
 
     template <typename T, int N, typename Val>
     struct push_back_container<fusion::extension::access::class_member_proxy<T, N>, Val
- , typename enable_if<
- is_reference<typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
- >::type>
+ , typename enable_if<is_reference<
+ typename fusion::extension::access::class_member_proxy<T, N>::lvalue
+ > >::type>
     {
- static bool call(fusion::extension::access::class_member_proxy<T, N>& p, Val const& val)
+ static bool call(fusion::extension::access::class_member_proxy<T, N>& p
+ , Val const& val)
         {
- typedef typename fusion::extension::access::class_member_proxy<T, N>::lvalue type;
- return push_back((type)p, val);
+ typedef typename
+ fusion::extension::access::class_member_proxy<T, N>::lvalue
+ type;
+ return push_back(type(p), val);
         }
     };
 
     template <typename T, int N>
     struct container_iterator<fusion::extension::access::class_member_proxy<T, N> >
- : container_iterator<typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
+ : container_iterator<
+ typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
     {};
 
     ///////////////////////////////////////////////////////////////////////////
@@ -54,7 +60,8 @@
         fusion::extension::access::class_member_proxy<T, N>, Val>
     {
         static void
- call(Val const& val, fusion::extension::access::class_member_proxy<T, N>& attr)
+ call(Val const& val
+ , fusion::extension::access::class_member_proxy<T, N>& attr)
         {
             attr = val;
         }
@@ -70,9 +77,9 @@
     template <typename T, int N, typename Attribute, typename Domain>
     struct transform_attribute<
         fusion::extension::access::class_member_proxy<T, N>, Attribute, Domain
- , typename disable_if<
- is_reference<typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
- >::type>
+ , typename disable_if<is_reference<
+ typename fusion::extension::access::class_member_proxy<T, N>::lvalue
+ > >::type>
     {
         typedef Attribute type;
 
@@ -96,9 +103,9 @@
     template <typename T, int N, typename Attribute, typename Domain>
     struct transform_attribute<
         fusion::extension::access::class_member_proxy<T, N>, Attribute, Domain
- , typename enable_if<
- is_reference<typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
- >::type>
+ , typename enable_if<is_reference<
+ typename fusion::extension::access::class_member_proxy<T, N>::lvalue
+ > >::type>
     {
         typedef Attribute& type;
 
@@ -122,8 +129,10 @@
     {
         static void call(fusion::extension::access::class_member_proxy<T, N>& val)
         {
- typedef fusion::extension::access::class_member_proxy<T, N>::lvalue lvalue;
- clear(lvalue(val));
+ typedef typename
+ fusion::extension::access::class_member_proxy<T, N>::lvalue
+ type;
+ clear(type(val));
         }
     };
 }}}


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