summaryrefslogtreecommitdiff
path: root/boost/spirit/home/qi/operator
diff options
context:
space:
mode:
Diffstat (limited to 'boost/spirit/home/qi/operator')
-rw-r--r--boost/spirit/home/qi/operator/permutation.hpp6
-rw-r--r--boost/spirit/home/qi/operator/sequential_or.hpp9
2 files changed, 6 insertions, 9 deletions
diff --git a/boost/spirit/home/qi/operator/permutation.hpp b/boost/spirit/home/qi/operator/permutation.hpp
index cadfa24e77..0934f74256 100644
--- a/boost/spirit/home/qi/operator/permutation.hpp
+++ b/boost/spirit/home/qi/operator/permutation.hpp
@@ -21,7 +21,6 @@
#include <boost/spirit/home/support/info.hpp>
#include <boost/fusion/include/size.hpp>
#include <boost/optional.hpp>
-#include <boost/foreach.hpp>
#include <boost/array.hpp>
namespace boost { namespace spirit
@@ -76,10 +75,7 @@ namespace boost { namespace spirit { namespace qi
f(first, last, context, skipper);
boost::array<bool, fusion::result_of::size<Elements>::value> flags;
- BOOST_FOREACH(bool& taken, flags)
- {
- taken = false;
- }
+ flags.fill(false);
// wrap the attribute in a tuple if it is not a tuple
typename traits::wrap_if_not_tuple<Attribute>::type attr_local(attr_);
diff --git a/boost/spirit/home/qi/operator/sequential_or.hpp b/boost/spirit/home/qi/operator/sequential_or.hpp
index a4c9c0ceca..96ac64e5d2 100644
--- a/boost/spirit/home/qi/operator/sequential_or.hpp
+++ b/boost/spirit/home/qi/operator/sequential_or.hpp
@@ -15,7 +15,7 @@
#include <boost/spirit/home/qi/detail/pass_function.hpp>
#include <boost/spirit/home/qi/detail/attributes.hpp>
#include <boost/spirit/home/support/detail/what_function.hpp>
-#include <boost/spirit/home/support/algorithm/any_if_ns.hpp>
+#include <boost/spirit/home/support/algorithm/any_if_ns_so.hpp>
#include <boost/spirit/home/support/handles_container.hpp>
#include <boost/fusion/include/as_vector.hpp>
#include <boost/fusion/include/for_each.hpp>
@@ -75,9 +75,10 @@ namespace boost { namespace spirit { namespace qi
typename traits::wrap_if_not_tuple<Attribute>::type attr_local(attr_);
// return true if *any* of the parsers succeed
- // (we use the non-short-circuiting version: any_if_ns
- // to force all elements to be tested)
- return spirit::any_if_ns(elements, attr_local, f, predicate());
+ // (we use the non-short-circuiting and strict order version:
+ // any_if_ns_so to force all the elements to be tested and
+ // in the defined order: first is first, last is last)
+ return spirit::any_if_ns_so(elements, attr_local, f, predicate());
}
template <typename Context>