diff options
Diffstat (limited to 'boost/spirit/home/qi/detail')
-rw-r--r-- | boost/spirit/home/qi/detail/alternative_function.hpp | 5 | ||||
-rw-r--r-- | boost/spirit/home/qi/detail/construct.hpp | 8 | ||||
-rw-r--r-- | boost/spirit/home/qi/detail/expectation_failure.hpp | 34 |
3 files changed, 41 insertions, 6 deletions
diff --git a/boost/spirit/home/qi/detail/alternative_function.hpp b/boost/spirit/home/qi/detail/alternative_function.hpp index 0c400a90d4..88f6dad9a0 100644 --- a/boost/spirit/home/qi/detail/alternative_function.hpp +++ b/boost/spirit/home/qi/detail/alternative_function.hpp @@ -23,7 +23,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail template <typename Variant, typename Expected> struct find_substitute { - // Get the typr from the variant that can be a substitute for Expected. + // Get the type from the variant that can be a substitute for Expected. // If none is found, just return Expected typedef Variant variant_type; @@ -138,8 +138,9 @@ namespace boost { namespace spirit { namespace qi { namespace detail template <typename Component> bool call(Component const& component, mpl::false_) const { + // fix for alternative.cpp test case, FHE 2016-07-28 return call_optional_or_variant( - component, spirit::traits::not_is_variant<Attribute, qi::domain>()); + component, mpl::not_<spirit::traits::not_is_optional<Attribute, qi::domain> >()); } template <typename Component> diff --git a/boost/spirit/home/qi/detail/construct.hpp b/boost/spirit/home/qi/detail/construct.hpp index 5d8122f6a5..829190e98e 100644 --- a/boost/spirit/home/qi/detail/construct.hpp +++ b/boost/spirit/home/qi/detail/construct.hpp @@ -143,20 +143,20 @@ namespace boost { namespace spirit { namespace traits #ifdef BOOST_HAS_LONG_LONG template <typename Iterator> - struct assign_to_attribute_from_iterators<long_long_type, Iterator> + struct assign_to_attribute_from_iterators<boost::long_long_type, Iterator> { static void - call(Iterator const& first, Iterator const& last, long_long_type& attr) + call(Iterator const& first, Iterator const& last, boost::long_long_type& attr) { Iterator first_ = first; qi::parse(first_, last, long_long_type(), attr); } }; template <typename Iterator> - struct assign_to_attribute_from_iterators<ulong_long_type, Iterator> + struct assign_to_attribute_from_iterators<boost::ulong_long_type, Iterator> { static void - call(Iterator const& first, Iterator const& last, ulong_long_type& attr) + call(Iterator const& first, Iterator const& last, boost::ulong_long_type& attr) { Iterator first_ = first; qi::parse(first_, last, ulong_long_type(), attr); diff --git a/boost/spirit/home/qi/detail/expectation_failure.hpp b/boost/spirit/home/qi/detail/expectation_failure.hpp new file mode 100644 index 0000000000..3571e2f3f1 --- /dev/null +++ b/boost/spirit/home/qi/detail/expectation_failure.hpp @@ -0,0 +1,34 @@ +/*============================================================================= +Copyright (c) 2001-2011 Joel de Guzman + +Distributed under the Boost Software License, Version 1.0. (See accompanying +file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(SPIRIT_EXPECTATION_FAILURE_JULY_19_2016) +#define SPIRIT_EXPECTATION_FAILURE_JULY_19_2016 + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/info.hpp> + +#include <stdexcept> + +namespace boost { namespace spirit { namespace qi { + template <typename Iterator> + struct expectation_failure : std::runtime_error + { + expectation_failure(Iterator first_, Iterator last_, info const& what) + : std::runtime_error("boost::spirit::qi::expectation_failure") + , first(first_), last(last_), what_(what) + {} + ~expectation_failure() throw() {} + + Iterator first; + Iterator last; + info what_; + }; +}}} + +#endif |