Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53615 - trunk/boost/spirit/home/karma/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-06-03 21:17:29


Author: hkaiser
Date: 2009-06-03 21:17:29 EDT (Wed, 03 Jun 2009)
New Revision: 53615
URL: http://svn.boost.org/trac/boost/changeset/53615

Log:
Spirit: fixing a attribute propagation problem in Karma alternatives
Text files modified:
   trunk/boost/spirit/home/karma/detail/alternative_function.hpp | 3 ++-
   1 files changed, 2 insertions(+), 1 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-06-03 21:17:29 EDT (Wed, 03 Jun 2009)
@@ -18,6 +18,7 @@
 #include <boost/mpl/find_if.hpp>
 #include <boost/mpl/deref.hpp>
 #include <boost/mpl/distance.hpp>
+#include <boost/mpl/or.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/variant.hpp>
 
@@ -30,7 +31,7 @@
     ///////////////////////////////////////////////////////////////////////////
     template <typename Expected, typename Attribute, typename IsNotVariant>
     struct compute_compatible_component_variant
- : is_same<Expected, Attribute> {};
+ : mpl::or_<is_same<Expected, Attribute>, is_same<Expected, hold_any> > {};
 
     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