Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60153 - trunk/boost/spirit/home/qi/detail
From: hartmut.kaiser_at_[hidden]
Date: 2010-03-04 13:56:52


Author: hkaiser
Date: 2010-03-04 13:56:52 EST (Thu, 04 Mar 2010)
New Revision: 60153
URL: http://svn.boost.org/trac/boost/changeset/60153

Log:
Spirit: Fixed return value for expect parser if exceptions are not enabled.
Text files modified:
   trunk/boost/spirit/home/qi/detail/expect_function.hpp | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/boost/spirit/home/qi/detail/expect_function.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/expect_function.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/expect_function.hpp 2010-03-04 13:56:52 EST (Thu, 04 Mar 2010)
@@ -45,18 +45,18 @@
                 spirit::traits::clear_queue(first);
 
             // if we are testing the first component in the sequence,
- // return true if the parser fails, if this not the first
+ // return true if the parser fails, if this is not the first
             // component, throw exception if the parser fails
             if (!component.parse(first, last, context, skipper, attr))
             {
                 if (is_first)
                 {
                     is_first = false;
- return true;
+ return true; // true means the match failed
                 }
                 boost::throw_exception(Exception(first, last, component.what(context)));
 #if defined(BOOST_NO_EXCEPTIONS)
- return false; // for systems not supporting exceptions
+ return true; // for systems not supporting exceptions
 #endif
             }
             is_first = 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