$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r71630 - in trunk/boost/spirit/home: qi/operator support
From: hartmut.kaiser_at_[hidden]
Date: 2011-04-30 13:33:36
Author: hkaiser
Date: 2011-04-30 13:33:35 EDT (Sat, 30 Apr 2011)
New Revision: 71630
URL: http://svn.boost.org/trac/boost/changeset/71630
Log:
Spirit: fixing an issue in Qi with adapted ADTs
Text files modified: 
   trunk/boost/spirit/home/qi/operator/optional.hpp         |     3 ++-                                     
   trunk/boost/spirit/home/support/adapt_adt_attributes.hpp |    14 ++++++++++++++                          
   2 files changed, 16 insertions(+), 1 deletions(-)
Modified: trunk/boost/spirit/home/qi/operator/optional.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/optional.hpp	(original)
+++ trunk/boost/spirit/home/qi/operator/optional.hpp	2011-04-30 13:33:35 EDT (Sat, 30 Apr 2011)
@@ -65,7 +65,8 @@
           , Attribute& attr, mpl::false_) const
         {
             // create a local value if Attribute is not unused_type
-            typename spirit::result_of::optional_value<Attribute>::type val;
+            typename spirit::result_of::optional_value<Attribute>::type val = 
+                spirit::result_of::optional_value<Attribute>::type();
 
             if (subject.parse(first, last, context, skipper, val))
             {
Modified: trunk/boost/spirit/home/support/adapt_adt_attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/adapt_adt_attributes.hpp	(original)
+++ trunk/boost/spirit/home/support/adapt_adt_attributes.hpp	2011-04-30 13:33:35 EDT (Sat, 30 Apr 2011)
@@ -389,4 +389,18 @@
     };
 }}}
 
+///////////////////////////////////////////////////////////////////////////////
+namespace boost { namespace spirit { namespace result_of
+{
+    template <typename T, int N, bool Const>
+    struct optional_value<fusion::extension::adt_attribute_proxy<T, N, Const> >
+      : result_of::optional_value<
+            typename remove_const<
+                typename remove_reference<
+                    typename fusion::extension::adt_attribute_proxy<T, N, Const>::type 
+                >::type
+            >::type>
+    {};
+}}}
+
 #endif