$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r70801 - in trunk/boost/spirit/home: karma/detail karma/operator qi/detail
From: hartmut.kaiser_at_[hidden]
Date: 2011-03-31 20:14:51
Author: hkaiser
Date: 2011-03-31 20:14:50 EDT (Thu, 31 Mar 2011)
New Revision: 70801
URL: http://svn.boost.org/trac/boost/changeset/70801
Log:
Spirit: fixing an issue with alternatives inside container components
Text files modified: 
   trunk/boost/spirit/home/karma/detail/pass_container.hpp |     7 +++++++                                 
   trunk/boost/spirit/home/karma/operator/alternative.hpp  |    10 +++++-----                              
   trunk/boost/spirit/home/qi/detail/pass_container.hpp    |     7 +++++++                                 
   3 files changed, 19 insertions(+), 5 deletions(-)
Modified: trunk/boost/spirit/home/karma/detail/pass_container.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/pass_container.hpp	(original)
+++ trunk/boost/spirit/home/karma/detail/pass_container.hpp	2011-03-31 20:14:50 EDT (Thu, 31 Mar 2011)
@@ -208,6 +208,13 @@
         BOOST_PP_CAT(T, N), Sequence>::type::value ||                         \
     /***/
 
+    // make sure unused variant parameters do not affect the outcome
+    template <typename Container, typename ValueType, typename Sequence>
+    struct pass_through_container<Container, ValueType
+          , boost::detail::variant::void_, Sequence>
+      : mpl::false_
+    {};
+
     template <typename Container, typename ValueType, typename Sequence
       , BOOST_VARIANT_ENUM_PARAMS(typename T)>
     struct pass_through_container<Container, ValueType
Modified: trunk/boost/spirit/home/karma/operator/alternative.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/alternative.hpp	(original)
+++ trunk/boost/spirit/home/karma/operator/alternative.hpp	2011-03-31 20:14:50 EDT (Thu, 31 Mar 2011)
@@ -191,14 +191,14 @@
     ///////////////////////////////////////////////////////////////////////////
     template <typename Elements, typename Attribute, typename Context
       , typename Iterator>
-    struct handles_container<karma::alternative<Elements>, Attribute, Context
-      , Iterator>
+    struct handles_container<karma::alternative<Elements>
+          , Attribute, Context, Iterator>
       : nary_handles_container<Elements, Attribute, Context, Iterator> {};
-    
+
     template <typename Elements, typename Attribute, typename Context
       , typename Iterator>
-    struct handles_container<karma::strict_alternative<Elements>, Attribute
-      , Context, Iterator>
+    struct handles_container<karma::strict_alternative<Elements>
+          , Attribute, Context, Iterator>
       : nary_handles_container<Elements, Attribute, Context, Iterator> {};
 }}}
 
Modified: trunk/boost/spirit/home/qi/detail/pass_container.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/pass_container.hpp	(original)
+++ trunk/boost/spirit/home/qi/detail/pass_container.hpp	2011-03-31 20:14:50 EDT (Thu, 31 Mar 2011)
@@ -203,6 +203,13 @@
         BOOST_PP_CAT(T, N), Sequence>::type::value ||                         \
     /***/
 
+    // make sure unused variant parameters do not affect the outcome
+    template <typename Container, typename ValueType, typename Sequence>
+    struct pass_through_container<Container, ValueType
+          , boost::detail::variant::void_, Sequence>
+      : mpl::false_
+    {};
+
     template <typename Container, typename ValueType, typename Sequence
       , BOOST_VARIANT_ENUM_PARAMS(typename T)>
     struct pass_through_container<Container, ValueType