|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57128 - trunk/boost/spirit/home/karma/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-24 10:09:04
Author: hkaiser
Date: 2009-10-24 10:09:03 EDT (Sat, 24 Oct 2009)
New Revision: 57128
URL: http://svn.boost.org/trac/boost/changeset/57128
Log:
Spirit: Karma alternative fix
Text files modified:
trunk/boost/spirit/home/karma/detail/alternative_function.hpp | 4 ++++
1 files changed, 4 insertions(+), 0 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-10-24 10:09:03 EDT (Sat, 24 Oct 2009)
@@ -161,6 +161,10 @@
typedef typename component_type::distance distance_type;
+ // if we got passed an empty optional, just fail generation
+ if (!traits::has_optional_value(attr))
+ return false;
+
// make sure, the content of the passed variant matches our
// expectations
typename traits::optional_attribute<Attribute>::type attr_ =
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