$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r70225 - in trunk: boost/spirit/home/karma/directive libs/spirit/doc libs/spirit/test/karma
From: hartmut.kaiser_at_[hidden]
Date: 2011-03-20 14:25:46
Author: hkaiser
Date: 2011-03-20 14:25:44 EDT (Sun, 20 Mar 2011)
New Revision: 70225
URL: http://svn.boost.org/trac/boost/changeset/70225
Log:
Spirit: comment fixes, minor adjustments
Text files modified: 
   trunk/boost/spirit/home/karma/directive/center_alignment.hpp |     4 ++--                                    
   trunk/boost/spirit/home/karma/directive/right_alignment.hpp  |     6 +++---                                  
   trunk/libs/spirit/doc/what_s_new.qbk                         |     9 ++++++++-                               
   trunk/libs/spirit/test/karma/kleene.cpp                      |    21 +++++++++++++++++++++                   
   4 files changed, 34 insertions(+), 6 deletions(-)
Modified: trunk/boost/spirit/home/karma/directive/center_alignment.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/directive/center_alignment.hpp	(original)
+++ trunk/boost/spirit/home/karma/directive/center_alignment.hpp	2011-03-20 14:25:44 EDT (Sun, 20 Mar 2011)
@@ -51,7 +51,7 @@
           , terminal_ex<tag::center, fusion::vector1<T> > >
       : mpl::true_ {};
 
-    // enables *lazy* delimit(d)[g], where d provides a generator
+    // enables *lazy* center(d)[g], where d provides a generator
     template <>
     struct use_lazy_directive<karma::domain, tag::center, 1> 
       : mpl::true_ {};
@@ -63,7 +63,7 @@
           , terminal_ex<tag::center, fusion::vector2<Width, Padding> > >
       : spirit::traits::matches<karma::domain, Padding> {};
 
-    // enables *lazy* delimit(w, d)[g], where d provides a generator and w is 
+    // enables *lazy* center(w, d)[g], where d provides a generator and w is 
     // a maximum width
     template <>
     struct use_lazy_directive<karma::domain, tag::center, 2> 
Modified: trunk/boost/spirit/home/karma/directive/right_alignment.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/directive/right_alignment.hpp	(original)
+++ trunk/boost/spirit/home/karma/directive/right_alignment.hpp	2011-03-20 14:25:44 EDT (Sun, 20 Mar 2011)
@@ -51,7 +51,7 @@
           , terminal_ex<tag::right_align, fusion::vector1<T> > >
       : mpl::true_ {};
 
-    // enables *lazy* delimit(d)[g], where d provides a generator
+    // enables *lazy* right_align(d)[g], where d provides a generator
     template <>
     struct use_lazy_directive<karma::domain, tag::right_align, 1> 
       : mpl::true_ {};
@@ -63,8 +63,8 @@
           , terminal_ex<tag::right_align, fusion::vector2<Width, Padding> > >
       : spirit::traits::matches<karma::domain, Padding> {};
 
-    // enables *lazy* delimit(w, d)[g], where d provides a generator and w is 
-    // a maximum width
+    // enables *lazy* right_align(w, d)[g], where d provides a generator and w 
+    // is a maximum width
     template <>
     struct use_lazy_directive<karma::domain, tag::right_align, 2> 
       : mpl::true_ {};
Modified: trunk/libs/spirit/doc/what_s_new.qbk
==============================================================================
--- trunk/libs/spirit/doc/what_s_new.qbk	(original)
+++ trunk/libs/spirit/doc/what_s_new.qbk	2011-03-20 14:25:44 EDT (Sun, 20 Mar 2011)
@@ -55,7 +55,8 @@
   a test.
 * Fixed the  __qi__ __qi_attr__ parser, the __qi__ __qi_symbols__ parser, and 
   the __karma__ [karma_symbols `symbols<>`] generator to properly handle 
-  container attributes. Those have been broken in Boost V1.46.1.
+  container attributes. Those have been broken in Boost V1.46.1 (thanks to 
+  Aaron Graham and Joerg Becker for reporting those).
 
 [heading Breaking Changes]
 
@@ -92,6 +93,12 @@
   in order for the new behavior to kick in. By default, the old behavior
   is still in place.
 * Alternatives now support attribute compatibility.
+* The attribute handling for container attributes of sequences and container
+  components (list, Kleene, Plus, and repeat) has been completely rewritten. 
+  It now supports many more use cases and behaves much more predictable than 
+  the older version. Thanks to Thomas Taylor, Richard Crossley, Semen, 
+  Adalberto Castelo, and many others for reporting bugs and helping in making 
+  the new code behave as expected.
 
 [endsect]
 
Modified: trunk/libs/spirit/test/karma/kleene.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/kleene.cpp	(original)
+++ trunk/libs/spirit/test/karma/kleene.cpp	2011-03-20 14:25:44 EDT (Sun, 20 Mar 2011)
@@ -47,6 +47,18 @@
     mutable std::vector<char>::iterator it;
 };
 
+struct A
+{
+    double d1;
+    double d2;
+};
+
+BOOST_FUSION_ADAPT_STRUCT(
+    A,
+    (double, d1)
+    (double, d2)
+)
+
 ///////////////////////////////////////////////////////////////////////////////
 int main()
 {
@@ -219,6 +231,15 @@
         BOOST_TEST(test("[6162636465666768]", '[' << *hex[action(v)] << ']'));
     }
 
+    {
+        using boost::spirit::karma::double_;
+
+        std::vector<A> v(1);
+        v[0].d1 = 1.0;
+        v[0].d2 = 2.0;
+        BOOST_TEST(test("A1.02.0", 'A' << *(double_ << double_), v));
+    }
+
     return boost::report_errors();
 }