Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58378 - trunk/boost/spirit/home/karma/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-12-14 10:51:14


Author: hkaiser
Date: 2009-12-14 10:51:13 EST (Mon, 14 Dec 2009)
New Revision: 58378
URL: http://svn.boost.org/trac/boost/changeset/58378

Log:
Spirit: fixing an issue with Karma alternatives
Text files modified:
   trunk/boost/spirit/home/karma/detail/alternative_function.hpp | 11 ++++++-----
   1 files changed, 6 insertions(+), 5 deletions(-)

Modified: trunk/boost/spirit/home/karma/detail/alternative_function.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/alternative_function.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/alternative_function.hpp 2009-12-14 10:51:13 EST (Mon, 14 Dec 2009)
@@ -44,17 +44,18 @@
 
     template <typename Container>
     struct is_hold_any_container
- : mpl::and_<
- traits::is_container<Container>
- , is_same<hold_any, typename traits::container_value<Container>::type>
- > {};
+ : is_same<hold_any, typename traits::container_value<Container>::type> {};
 
     template <typename Expected, typename Attribute, typename IsNotVariant>
     struct compute_compatible_component_variant
       : mpl::or_<
             attribute_is_compatible<Expected, Attribute>
           , is_same<hold_any, Expected>
- , is_hold_any_container<Expected> > {};
+ , mpl::eval_if<
+ traits::is_container<Expected>
+ , is_hold_any_container<Expected>
+ , mpl::false_>
+ > {};
 
     template <typename Expected, typename Attribute>
     struct compute_compatible_component_variant<Expected, Attribute, mpl::false_>


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