update boost on linux
This commit is contained in:
@@ -23,16 +23,14 @@ 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;
|
||||
typedef typename variant_type::types types;
|
||||
typedef typename mpl::end<types>::type end;
|
||||
|
||||
typedef typename
|
||||
mpl::find_if<types, is_same<mpl::_1, Expected> >::type
|
||||
iter_1;
|
||||
typedef typename mpl::find<types, Expected>::type iter_1;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
|
||||
@@ -94,16 +94,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
}
|
||||
};
|
||||
|
||||
// reference types need special handling
|
||||
template <typename Attribute>
|
||||
struct transform_attribute<Attribute&, Attribute>
|
||||
{
|
||||
typedef Attribute& type;
|
||||
static Attribute& pre(Attribute& val) { return val; }
|
||||
static void post(Attribute&, Attribute const&) {}
|
||||
static void fail(Attribute&) {}
|
||||
};
|
||||
|
||||
// unused_type needs some special handling as well
|
||||
template <>
|
||||
struct transform_attribute<unused_type, unused_type>
|
||||
@@ -119,16 +109,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
: transform_attribute<unused_type, unused_type>
|
||||
{};
|
||||
|
||||
template <typename Attribute>
|
||||
struct transform_attribute<unused_type, Attribute>
|
||||
: transform_attribute<unused_type, unused_type>
|
||||
{};
|
||||
|
||||
template <typename Attribute>
|
||||
struct transform_attribute<unused_type const, Attribute>
|
||||
: transform_attribute<unused_type, unused_type>
|
||||
{};
|
||||
|
||||
template <typename Attribute>
|
||||
struct transform_attribute<Attribute, unused_type>
|
||||
: transform_attribute<unused_type, unused_type>
|
||||
@@ -143,33 +123,11 @@ namespace boost { namespace spirit { namespace qi
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost { namespace spirit { namespace traits
|
||||
{
|
||||
template <typename Exposed, typename Transformed>
|
||||
struct transform_attribute<Exposed, Transformed, qi::domain>
|
||||
: qi::transform_attribute<Exposed, Transformed>
|
||||
{};
|
||||
|
||||
template <typename Exposed, typename Transformed>
|
||||
struct transform_attribute<Exposed&, Transformed, qi::domain>
|
||||
: transform_attribute<Exposed, Transformed, qi::domain>
|
||||
{};
|
||||
|
||||
template <typename Attribute>
|
||||
struct transform_attribute<Attribute&, Attribute, qi::domain>
|
||||
: qi::transform_attribute<Attribute&, Attribute>
|
||||
{};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename Exposed, typename Transformed>
|
||||
void post_transform(Exposed& dest, Transformed const& attr)
|
||||
{
|
||||
return transform_attribute<Exposed, Transformed, qi::domain>::post(dest, attr);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename Exposed, typename Transformed>
|
||||
void fail_transform(Exposed& dest, Transformed const&)
|
||||
{
|
||||
return transform_attribute<Exposed, Transformed, qi::domain>::fail(dest);
|
||||
namespace detail {
|
||||
template <typename Exposed, typename Transformed>
|
||||
struct transform_attribute_base<Exposed, Transformed, qi::domain>
|
||||
: qi::transform_attribute<Exposed, Transformed>
|
||||
{};
|
||||
}
|
||||
}}}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*=============================================================================
|
||||
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 <boost/config.hpp> // for BOOST_SYMBOL_VISIBLE
|
||||
#include <stdexcept>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi {
|
||||
template <typename Iterator>
|
||||
struct BOOST_SYMBOL_VISIBLE 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() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
Iterator first;
|
||||
Iterator last;
|
||||
info what_;
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -43,22 +43,6 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename Component, typename Attribute>
|
||||
bool operator()(Component const& component, boost::optional<Attribute>& attr)
|
||||
{
|
||||
// return true if the parser succeeds and the slot is not yet taken
|
||||
Attribute val;
|
||||
if (!*taken && component.parse(first, last, context, skipper, val))
|
||||
{
|
||||
attr = val;
|
||||
*taken = true;
|
||||
++taken;
|
||||
return true;
|
||||
}
|
||||
++taken;
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename Component>
|
||||
bool operator()(Component const& component)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user