update boost
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
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_ACTION_JANUARY_07_2007_1233PM)
|
||||
#define SPIRIT_ACTION_JANUARY_07_2007_1233PM
|
||||
#ifndef BOOST_SPIRIT_QI_ACTION_HPP
|
||||
#define BOOST_SPIRIT_QI_ACTION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_ACTION_JANUARY_07_2007_1128AM)
|
||||
#define SPIRIT_ACTION_JANUARY_07_2007_1128AM
|
||||
#ifndef BOOST_SPIRIT_QI_ACTION_ACTION_HPP
|
||||
#define BOOST_SPIRIT_QI_ACTION_ACTION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -136,10 +136,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
|
||||
Subject subject;
|
||||
Action f;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
action& operator= (action const&);
|
||||
};
|
||||
}}}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <boost/mpl/fold.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/push_back.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/fusion/include/as_vector.hpp>
|
||||
|
||||
|
||||
@@ -72,10 +72,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
}
|
||||
|
||||
Value value_;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
attr_parser& operator= (attr_parser const&);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// 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_QI_ATTR_CAST_SEP_26_2009_0735PM)
|
||||
#define SPIRIT_QI_ATTR_CAST_SEP_26_2009_0735PM
|
||||
#ifndef BOOST_SPIRIT_QI_AUXILIARY_ATTR_CAST_HPP
|
||||
#define BOOST_SPIRIT_QI_AUXILIARY_ATTR_CAST_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -113,10 +113,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
}
|
||||
|
||||
Subject subject;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
attr_cast_parser& operator= (attr_cast_parser const&);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -18,12 +18,19 @@
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/spirit/home/support/lazy.hpp>
|
||||
#include <boost/spirit/include/phoenix_core.hpp>
|
||||
#include <boost/fusion/include/at.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/proto/make_expr.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename Expr>
|
||||
struct actor;
|
||||
}}
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -195,20 +195,11 @@ namespace boost { namespace spirit { namespace qi
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
template <BOOST_SCOPED_ENUM(boost::spirit::endian::endianness) bits>
|
||||
template <BOOST_SCOPED_ENUM(boost::endian::order) bits>
|
||||
struct what;
|
||||
|
||||
template <>
|
||||
struct what<boost::spirit::endian::endianness::native>
|
||||
{
|
||||
static std::string is()
|
||||
{
|
||||
return "native-endian binary";
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct what<boost::spirit::endian::endianness::little>
|
||||
struct what<boost::endian::order::little>
|
||||
{
|
||||
static char const* is()
|
||||
{
|
||||
@@ -217,7 +208,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
};
|
||||
|
||||
template <>
|
||||
struct what<boost::spirit::endian::endianness::big>
|
||||
struct what<boost::endian::order::big>
|
||||
{
|
||||
static char const* is()
|
||||
{
|
||||
@@ -227,13 +218,13 @@ namespace boost { namespace spirit { namespace qi
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename T, BOOST_SCOPED_ENUM(boost::spirit::endian::endianness) endian, int bits>
|
||||
template <typename T, BOOST_SCOPED_ENUM(boost::endian::order) endian, int bits>
|
||||
struct any_binary_parser : primitive_parser<any_binary_parser<T, endian, bits> >
|
||||
{
|
||||
template <typename Context, typename Iterator>
|
||||
struct attribute
|
||||
{
|
||||
typedef boost::spirit::endian::endian<endian, typename T::type,
|
||||
typedef boost::endian::endian_arithmetic<endian, typename T::type,
|
||||
bits> type;
|
||||
};
|
||||
|
||||
@@ -246,7 +237,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
qi::skip_over(first, last, skipper);
|
||||
|
||||
typename attribute<Context, Iterator>::type attr_;
|
||||
unsigned char* bytes = reinterpret_cast<unsigned char*>(&attr_);
|
||||
unsigned char* bytes = attr_.data();
|
||||
|
||||
Iterator it = first;
|
||||
for (unsigned int i = 0; i < sizeof(attr_); ++i)
|
||||
@@ -270,7 +261,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename V, typename T
|
||||
, BOOST_SCOPED_ENUM(boost::spirit::endian::endianness) endian, int bits>
|
||||
, BOOST_SCOPED_ENUM(boost::endian::order) endian, int bits>
|
||||
struct binary_lit_parser
|
||||
: primitive_parser<binary_lit_parser<V, T, endian, bits> >
|
||||
{
|
||||
@@ -291,11 +282,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
qi::skip_over(first, last, skipper);
|
||||
|
||||
// Even if the endian types are not pod's (at least not in the
|
||||
// definition of C++03) it seems to be safe to assume they are
|
||||
// (but in C++0x the endian types _are_ PODs).
|
||||
// This allows us to treat them as a sequence of consecutive bytes.
|
||||
boost::spirit::endian::endian<endian, typename T::type, bits> attr_;
|
||||
boost::endian::endian_arithmetic<endian, typename T::type, bits> attr_;
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
// warning C4244: 'argument' : conversion from 'const int' to 'foo', possible loss of data
|
||||
@@ -307,7 +294,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
unsigned char* bytes = reinterpret_cast<unsigned char*>(&attr_);
|
||||
unsigned char* bytes = attr_.data();
|
||||
|
||||
Iterator it = first;
|
||||
for (unsigned int i = 0; i < sizeof(attr_); ++i)
|
||||
@@ -333,7 +320,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Parser generators: make_xxx function (objects)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename T, BOOST_SCOPED_ENUM(boost::spirit::endian::endianness) endian, int bits>
|
||||
template <typename T, BOOST_SCOPED_ENUM(boost::endian::order) endian, int bits>
|
||||
struct make_binary_parser
|
||||
{
|
||||
typedef any_binary_parser<T, endian, bits> result_type;
|
||||
@@ -344,7 +331,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
};
|
||||
|
||||
template <typename V, typename T
|
||||
, BOOST_SCOPED_ENUM(boost::spirit::endian::endianness) endian, int bits>
|
||||
, BOOST_SCOPED_ENUM(boost::endian::order) endian, int bits>
|
||||
struct make_binary_lit_parser
|
||||
{
|
||||
typedef binary_lit_parser<V, T, endian, bits> result_type;
|
||||
@@ -359,13 +346,13 @@ namespace boost { namespace spirit { namespace qi
|
||||
template <typename Modifiers> \
|
||||
struct make_primitive<tag::name, Modifiers> \
|
||||
: make_binary_parser<detail::integer<bits>, \
|
||||
boost::spirit::endian::endianness::endiantype, bits> {}; \
|
||||
boost::endian::order::endiantype, bits> {}; \
|
||||
\
|
||||
template <typename Modifiers, typename A0> \
|
||||
struct make_primitive< \
|
||||
terminal_ex<tag::name, fusion::vector1<A0> > , Modifiers> \
|
||||
: make_binary_lit_parser<A0, detail::integer<bits>, \
|
||||
boost::spirit::endian::endianness::endiantype, bits> {}; \
|
||||
boost::endian::order::endiantype, bits> {}; \
|
||||
\
|
||||
/***/
|
||||
|
||||
@@ -388,13 +375,13 @@ namespace boost { namespace spirit { namespace qi
|
||||
template<typename Modifiers> \
|
||||
struct make_primitive<tag::name, Modifiers> \
|
||||
: make_binary_parser<detail::floating_point<bits>, \
|
||||
boost::spirit::endian::endianness::endiantype, bits> {}; \
|
||||
boost::endian::order::endiantype, bits> {}; \
|
||||
\
|
||||
template<typename Modifiers, typename A0> \
|
||||
struct make_primitive< \
|
||||
terminal_ex<tag::name, fusion::vector1<A0> >, Modifiers> \
|
||||
: make_binary_lit_parser<A0, detail::floating_point<bits>, \
|
||||
boost::spirit::endian::endianness::endiantype, \
|
||||
boost::endian::order::endiantype, \
|
||||
bits> {}; \
|
||||
\
|
||||
/***/
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <boost/spirit/home/qi/skip_over.hpp>
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
#define BOOST_SPIRIT_COPY_FEBRUARY_7_2012_0159PM
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/proto/proto.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
|
||||
#include <boost/proto/deep_copy.hpp>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_ALTERNATIVE_FUNCTION_APRIL_23_2007_1046AM)
|
||||
#define SPIRIT_ALTERNATIVE_FUNCTION_APRIL_23_2007_1046AM
|
||||
#ifndef BOOST_SPIRIT_QI_DETAIL_ALTERNATIVE_FUNCTION_HPP
|
||||
#define BOOST_SPIRIT_QI_DETAIL_ALTERNATIVE_FUNCTION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -20,22 +20,22 @@
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
template <typename Variant, typename Expected>
|
||||
template <typename Variant, typename T>
|
||||
struct find_substitute
|
||||
{
|
||||
// Get the type from the variant that can be a substitute for Expected.
|
||||
// If none is found, just return Expected
|
||||
// Get the type from the Variant that can be a substitute for T.
|
||||
// If none is found, just return T
|
||||
|
||||
typedef Variant variant_type;
|
||||
typedef typename variant_type::types types;
|
||||
typedef typename mpl::end<types>::type end;
|
||||
|
||||
typedef typename mpl::find<types, Expected>::type iter_1;
|
||||
typedef typename mpl::find<types, T>::type iter_1;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_same<iter_1, end>,
|
||||
mpl::find_if<types, traits::is_substitute<mpl::_1, Expected> >,
|
||||
mpl::find_if<types, traits::is_substitute<T, mpl::_1> >,
|
||||
mpl::identity<iter_1>
|
||||
>::type
|
||||
iter;
|
||||
@@ -43,12 +43,16 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_same<iter, end>,
|
||||
mpl::identity<Expected>,
|
||||
mpl::identity<T>,
|
||||
mpl::deref<iter>
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename Iterator, typename Context, typename Skipper,
|
||||
typename Attribute>
|
||||
struct alternative_function
|
||||
@@ -173,10 +177,6 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Context& context;
|
||||
Skipper const& skipper;
|
||||
Attribute& attr;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
alternative_function& operator= (alternative_function const&);
|
||||
};
|
||||
|
||||
template <typename Iterator, typename Context, typename Skipper>
|
||||
@@ -201,11 +201,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Iterator const& last;
|
||||
Context& context;
|
||||
Skipper const& skipper;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
alternative_function& operator= (alternative_function const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
}}}}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <boost/fusion/include/copy.hpp>
|
||||
#include <boost/fusion/adapted/struct/detail/extension.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/range/range_fwd.hpp>
|
||||
|
||||
namespace boost { namespace spirit { namespace traits
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// 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_QI_DETAIL_ATTRIBUTES_APR_18_2010_0458PM)
|
||||
#define SPIRIT_QI_DETAIL_ATTRIBUTES_APR_18_2010_0458PM
|
||||
#ifndef BOOST_SPIRIT_QI_DETAIL_ATTRIBUTES_HPP
|
||||
#define BOOST_SPIRIT_QI_DETAIL_ATTRIBUTES_HPP
|
||||
|
||||
#include <boost/spirit/home/qi/domain.hpp>
|
||||
#include <boost/spirit/home/support/attributes_fwd.hpp>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_EXPECT_FUNCTION_APR_29_2007_0558PM)
|
||||
#define SPIRIT_EXPECT_FUNCTION_APR_29_2007_0558PM
|
||||
#ifndef BOOST_SPIRIT_QI_DETAIL_EXPECT_FUNCTION_HPP
|
||||
#define BOOST_SPIRIT_QI_DETAIL_EXPECT_FUNCTION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <
|
||||
typename Iterator, typename Context
|
||||
, typename Skipper, typename Exception>
|
||||
@@ -95,11 +99,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Context& context;
|
||||
Skipper const& skipper;
|
||||
mutable bool is_first;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
expect_function& operator= (expect_function const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}}}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,8 +4,8 @@ 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
|
||||
#ifndef BOOST_SPIRIT_QI_DETAIL_EXPECTATION_FAILURE_HPP
|
||||
#define BOOST_SPIRIT_QI_DETAIL_EXPECTATION_FAILURE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -24,7 +24,7 @@ namespace boost { namespace spirit { namespace qi {
|
||||
: std::runtime_error("boost::spirit::qi::expectation_failure")
|
||||
, first(first_), last(last_), what_(what)
|
||||
{}
|
||||
~expectation_failure() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
~expectation_failure() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {}
|
||||
|
||||
Iterator first;
|
||||
Iterator last;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_FAIL_FUNCTION_APRIL_22_2006_0159PM)
|
||||
#define SPIRIT_FAIL_FUNCTION_APRIL_22_2006_0159PM
|
||||
#ifndef BOOST_SPIRIT_QI_DETAIL_FAIL_FUNCTION_HPP
|
||||
#define BOOST_SPIRIT_QI_DETAIL_FAIL_FUNCTION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -15,6 +15,10 @@
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename Iterator, typename Context, typename Skipper>
|
||||
struct fail_function
|
||||
{
|
||||
@@ -49,11 +53,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Iterator const& last;
|
||||
Context& context;
|
||||
Skipper const& skipper;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
fail_function& operator= (fail_function const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}}}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,41 +42,6 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
// the following specializations are needed to explicitly disambiguate
|
||||
// the two possible specializations for parse_impl<char> and
|
||||
// parse_impl<wchar_t>
|
||||
template <>
|
||||
struct parse_impl<char>
|
||||
{
|
||||
template <typename Iterator>
|
||||
static bool call(Iterator& first, Iterator last, char& expr)
|
||||
{
|
||||
return qi::parse(first, last, create_parser<char>(), expr);
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
static bool call(Iterator& first, Iterator last, char const&)
|
||||
{
|
||||
return qi::parse(first, last, create_parser<char>());
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct parse_impl<wchar_t>
|
||||
{
|
||||
template <typename Iterator>
|
||||
static bool call(Iterator& first, Iterator last, wchar_t& expr)
|
||||
{
|
||||
return qi::parse(first, last, create_parser<wchar_t>(), expr);
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
static bool call(Iterator& first, Iterator last, wchar_t const&)
|
||||
{
|
||||
return qi::parse(first, last, create_parser<wchar_t>());
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename Expr>
|
||||
struct phrase_parse_impl<Expr
|
||||
@@ -102,49 +67,6 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
, skipper, post_skip, const_cast<Expr&>(expr));
|
||||
}
|
||||
};
|
||||
|
||||
// the following specializations are needed to explicitly disambiguate
|
||||
// the two possible specializations for phrase_parse_impl<char> and
|
||||
// phrase_parse_impl<wchar_t>
|
||||
template <>
|
||||
struct phrase_parse_impl<char>
|
||||
{
|
||||
template <typename Iterator, typename Skipper>
|
||||
static bool call(Iterator& first, Iterator last, char& expr
|
||||
, Skipper const& skipper, BOOST_SCOPED_ENUM(skip_flag) post_skip)
|
||||
{
|
||||
return qi::phrase_parse(first, last, create_parser<char>()
|
||||
, skipper, post_skip, expr);
|
||||
}
|
||||
|
||||
template <typename Iterator, typename Skipper>
|
||||
static bool call(Iterator& first, Iterator last, char const&
|
||||
, Skipper const& skipper, BOOST_SCOPED_ENUM(skip_flag) post_skip)
|
||||
{
|
||||
return qi::phrase_parse(first, last, create_parser<char>()
|
||||
, skipper, post_skip);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct phrase_parse_impl<wchar_t>
|
||||
{
|
||||
template <typename Iterator, typename Skipper>
|
||||
static bool call(Iterator& first, Iterator last, wchar_t& expr
|
||||
, Skipper const& skipper, BOOST_SCOPED_ENUM(skip_flag) post_skip)
|
||||
{
|
||||
return qi::phrase_parse(first, last, create_parser<wchar_t>()
|
||||
, skipper, post_skip, expr);
|
||||
}
|
||||
|
||||
template <typename Iterator, typename Skipper>
|
||||
static bool call(Iterator& first, Iterator last, wchar_t const&
|
||||
, Skipper const& skipper, BOOST_SCOPED_ENUM(skip_flag) post_skip)
|
||||
{
|
||||
return qi::phrase_parse(first, last, create_parser<wchar_t>()
|
||||
, skipper, post_skip);
|
||||
}
|
||||
};
|
||||
}}}}
|
||||
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_PASS_CONTAINER_JANUARY_06_2009_0802PM)
|
||||
#define SPIRIT_PASS_CONTAINER_JANUARY_06_2009_0802PM
|
||||
#ifndef BOOST_SPIRIT_QI_DETAIL_PASS_CONTAINER_HPP
|
||||
#define BOOST_SPIRIT_QI_DETAIL_PASS_CONTAINER_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -261,6 +261,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
// This function handles the case where the attribute (Attr) given
|
||||
// the sequence is an STL container. This is a wrapper around F.
|
||||
// The function F does the actual parsing.
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename F, typename Attr, typename Sequence>
|
||||
struct pass_container
|
||||
{
|
||||
@@ -353,11 +357,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
|
||||
F f;
|
||||
Attr& attr;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
pass_container& operator= (pass_container const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Utility function to make a pass_container for container components
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_PASS_FUNCTION_FEBRUARY_05_2007_1138AM)
|
||||
#define SPIRIT_PASS_FUNCTION_FEBRUARY_05_2007_1138AM
|
||||
#ifndef BOOST_SPIRIT_QI_DETAIL_PASS_FUNCTION_HPP
|
||||
#define BOOST_SPIRIT_QI_DETAIL_PASS_FUNCTION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -16,6 +16,10 @@
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename Iterator, typename Context, typename Skipper>
|
||||
struct pass_function
|
||||
{
|
||||
@@ -60,11 +64,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Iterator const& last;
|
||||
Context& context;
|
||||
Skipper const& skipper;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
pass_function& operator= (pass_function const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}}}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_PERMUTE_FUNCTION_MARCH_13_2007_1129AM)
|
||||
#define SPIRIT_PERMUTE_FUNCTION_MARCH_13_2007_1129AM
|
||||
#ifndef BOOST_SPIRIT_QI_DETAIL_PERMUTE_FUNCTION_HPP
|
||||
#define BOOST_SPIRIT_QI_DETAIL_PERMUTE_FUNCTION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -16,6 +16,10 @@
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename Iterator, typename Context, typename Skipper>
|
||||
struct permute_function
|
||||
{
|
||||
@@ -62,11 +66,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Context& context;
|
||||
Skipper const& skipper;
|
||||
bool* taken;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
permute_function& operator= (permute_function const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}}}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,17 +15,20 @@
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename Skipper>
|
||||
struct unused_skipper : unused_type
|
||||
{
|
||||
unused_skipper(Skipper const& skipper_)
|
||||
: skipper(skipper_) {}
|
||||
Skipper const& skipper;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
unused_skipper& operator= (unused_skipper const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
template <typename Skipper>
|
||||
struct is_unused_skipper
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
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_AS_DECEMBER_6_2010_1013AM)
|
||||
#define SPIRIT_AS_DECEMBER_6_2010_1013AM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_AS_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_AS_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -25,8 +25,6 @@
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/spirit/home/support/assert_msg.hpp>
|
||||
#include <boost/spirit/home/support/container.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_ENCODING_MARCH_05_2010_0528PM)
|
||||
#define SPIRIT_ENCODING_MARCH_05_2010_0528PM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_ENCODING_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_ENCODING_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -4,8 +4,8 @@ Copyright (c) 2016 Frank Hein, maxence business consulting gmbh
|
||||
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_EXPECT_JULY_13_2016)
|
||||
#define SPIRIT_EXPECT_JULY_13_2016
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_EXPECT_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_EXPECT_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_HOLD_FEBRUARY_6_2010_0917AM)
|
||||
#define SPIRIT_HOLD_FEBRUARY_6_2010_0917AM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_HOLD_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_HOLD_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_LEXEME_MARCH_24_2007_0802AM)
|
||||
#define SPIRIT_LEXEME_MARCH_24_2007_0802AM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_LEXEME_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_LEXEME_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_MATCHES_JAN_07_2010_0745PM)
|
||||
#define SPIRIT_MATCHES_JAN_07_2010_0745PM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_MATCHES_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_MATCHES_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -70,10 +70,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
}
|
||||
|
||||
Subject subject;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
matches_directive& operator= (matches_directive const&);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_NO_CASE_OCTOBER_25_2008_0424PM)
|
||||
#define SPIRIT_NO_CASE_OCTOBER_25_2008_0424PM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_NO_CASE_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_NO_CASE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_NO_SKIP_JAN_16_2010_0802PM)
|
||||
#define SPIRIT_NO_SKIP_JAN_16_2010_0802PM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_NO_SKIP_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_NO_SKIP_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_OMIT_MARCH_24_2007_0802AM)
|
||||
#define SPIRIT_OMIT_MARCH_24_2007_0802AM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_OMIT_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_OMIT_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -69,10 +69,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
}
|
||||
|
||||
Subject subject;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
omit_directive& operator= (omit_directive const&);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_RAW_APRIL_9_2007_0912AM)
|
||||
#define SPIRIT_RAW_APRIL_9_2007_0912AM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_RAW_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_RAW_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/spirit/home/support/has_semantic_action.hpp>
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/range/iterator_range_core.hpp> // TODO: use forward include
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
@@ -105,7 +105,7 @@ namespace boost { namespace spirit { namespace traits
|
||||
, typename Iterator>
|
||||
struct handles_container<qi::raw_directive<Subject>, Attribute
|
||||
, Context, Iterator>
|
||||
: unary_handles_container<Subject, Attribute, Context, Iterator> {};
|
||||
: mpl::true_ {};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_REPEAT_NOVEMBER_14_2008_1148AM)
|
||||
#define SPIRIT_REPEAT_NOVEMBER_14_2008_1148AM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_REPEAT_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_REPEAT_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -78,6 +78,10 @@ namespace boost { namespace spirit { namespace qi
|
||||
using spirit::repeat_type;
|
||||
using spirit::inf_type;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename T>
|
||||
struct exact_iterator // handles repeat(exact)[p]
|
||||
{
|
||||
@@ -90,10 +94,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
bool got_min(T i) const { return i >= exact; }
|
||||
|
||||
T const exact;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
exact_iterator& operator= (exact_iterator const&);
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -110,10 +110,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
|
||||
T const min;
|
||||
T const max;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
finite_iterator& operator= (finite_iterator const&);
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -128,11 +124,10 @@ namespace boost { namespace spirit { namespace qi
|
||||
bool got_min(T i) const { return i >= min; }
|
||||
|
||||
T const min;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
infinite_iterator& operator= (infinite_iterator const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
template <typename Subject, typename LoopIter>
|
||||
struct repeat_parser : unary_parser<repeat_parser<Subject, LoopIter> >
|
||||
@@ -208,10 +203,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
|
||||
Subject subject;
|
||||
LoopIter iter;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
repeat_parser& operator= (repeat_parser const&);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_SKIP_JANUARY_26_2008_0422PM)
|
||||
#define SPIRIT_SKIP_JANUARY_26_2008_0422PM
|
||||
#ifndef BOOST_SPIRIT_QI_DIRECTIVE_SKIP_HPP
|
||||
#define BOOST_SPIRIT_QI_DIRECTIVE_SKIP_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <boost/spirit/home/qi/domain.hpp>
|
||||
#include <boost/spirit/home/qi/parser.hpp>
|
||||
#include <boost/spirit/home/support/string_traits.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/fusion/include/at.hpp>
|
||||
|
||||
@@ -11,15 +11,11 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/spirit/home/qi/nonterminal/rule.hpp>
|
||||
#include <boost/spirit/home/qi/nonterminal/debug_handler_state.hpp>
|
||||
#include <boost/spirit/home/qi/detail/expectation_failure.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/fusion/include/at.hpp>
|
||||
#include <boost/fusion/include/vector.hpp>
|
||||
#include <boost/fusion/include/out.hpp>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp>
|
||||
#include <boost/spirit/home/qi/reference.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/proto/extends.hpp>
|
||||
#include <boost/proto/traits.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
@@ -40,6 +39,10 @@
|
||||
#include <boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp>
|
||||
#include <boost/spirit/home/qi/skip_over.hpp>
|
||||
|
||||
#include <boost/proto/extends.hpp>
|
||||
#include <boost/proto/traits.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4355) // 'this' : used in base member initializer list warning
|
||||
@@ -127,7 +130,10 @@ namespace boost { namespace spirit { namespace qi
|
||||
typedef typename
|
||||
spirit::detail::attr_from_sig<sig_type>::type
|
||||
attr_type;
|
||||
typedef typename add_reference<attr_type>::type attr_reference_type;
|
||||
BOOST_STATIC_ASSERT_MSG(
|
||||
!is_reference<attr_type>::value,
|
||||
"Reference qualifier on Qi rule attribute is meaningless");
|
||||
typedef attr_type& attr_reference_type;
|
||||
|
||||
// parameter_types is a sequence of types passed as parameters to the rule
|
||||
typedef typename
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_QI_BOOL_SEP_29_2009_0709AM)
|
||||
#define SPIRIT_QI_BOOL_SEP_29_2009_0709AM
|
||||
#ifndef BOOST_SPIRIT_QI_NUMERIC_BOOL_HPP
|
||||
#define BOOST_SPIRIT_QI_NUMERIC_BOOL_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -128,7 +128,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
return false;
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
p; // suppresses warning: C4100: 'p' : unreferenced formal parameter
|
||||
(void)p; // suppresses warning: C4100: 'p' : unreferenced formal parameter
|
||||
#endif
|
||||
return (allow_true && p.parse_true(first, last, attr)) ||
|
||||
(!disallow_false && p.parse_false(first, last, attr));
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_QI_BOOL_POLICIES_SEP_29_2009_0710AM)
|
||||
#define SPIRIT_QI_BOOL_POLICIES_SEP_29_2009_0710AM
|
||||
#ifndef BOOST_SPIRIT_QI_NUMERIC_BOOL_POLICIES_HPP
|
||||
#define BOOST_SPIRIT_QI_NUMERIC_BOOL_POLICIES_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
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_NUMERIC_UTILS_APRIL_17_2006_0816AM)
|
||||
#define SPIRIT_NUMERIC_UTILS_APRIL_17_2006_0816AM
|
||||
#ifndef BOOST_SPIRIT_QI_NUMERIC_DETAIL_NUMERIC_UTILS_HPP
|
||||
#define BOOST_SPIRIT_QI_NUMERIC_DETAIL_NUMERIC_UTILS_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2001-2019 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Hartmut Kaiser
|
||||
http://spirit.sourceforge.net/
|
||||
|
||||
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_REAL_IMPL_APRIL_18_2006_0901AM)
|
||||
#define SPIRIT_REAL_IMPL_APRIL_18_2006_0901AM
|
||||
#ifndef BOOST_SPIRIT_QI_NUMERIC_DETAIL_REAL_IMPL_HPP
|
||||
#define BOOST_SPIRIT_QI_NUMERIC_DETAIL_REAL_IMPL_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -19,10 +19,11 @@
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/spirit/home/qi/detail/attributes.hpp>
|
||||
#include <boost/spirit/home/support/detail/pow10.hpp>
|
||||
#include <boost/spirit/home/support/detail/sign.hpp>
|
||||
#include <boost/integer.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#include <boost/core/cmath.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4100) // 'p': unreferenced formal parameter
|
||||
@@ -65,11 +66,11 @@ namespace boost { namespace spirit { namespace traits
|
||||
{
|
||||
if (exp >= 0)
|
||||
{
|
||||
int max_exp = std::numeric_limits<T>::max_exponent10;
|
||||
int const max_exp = std::numeric_limits<T>::max_exponent10;
|
||||
|
||||
// return false if exp exceeds the max_exp
|
||||
// do this check only for primitive types!
|
||||
if (is_floating_point<T>() && exp > max_exp)
|
||||
if (is_floating_point<T>() && (exp > max_exp))
|
||||
return false;
|
||||
n = acc_n * pow10<T>(exp);
|
||||
}
|
||||
@@ -77,7 +78,7 @@ namespace boost { namespace spirit { namespace traits
|
||||
{
|
||||
if (exp < std::numeric_limits<T>::min_exponent10)
|
||||
{
|
||||
int min_exp = std::numeric_limits<T>::min_exponent10;
|
||||
int const min_exp = std::numeric_limits<T>::min_exponent10;
|
||||
detail::compensate_roundoff(n, acc_n);
|
||||
n /= pow10<T>(-min_exp);
|
||||
|
||||
@@ -121,19 +122,19 @@ namespace boost { namespace spirit { namespace traits
|
||||
inline float
|
||||
negate(bool neg, float n)
|
||||
{
|
||||
return neg ? spirit::detail::changesign(n) : n;
|
||||
return neg ? (core::copysign)(n, -1.f) : n;
|
||||
}
|
||||
|
||||
inline double
|
||||
negate(bool neg, double n)
|
||||
{
|
||||
return neg ? spirit::detail::changesign(n) : n;
|
||||
return neg ? (core::copysign)(n, -1.) : n;
|
||||
}
|
||||
|
||||
inline long double
|
||||
negate(bool neg, long double n)
|
||||
{
|
||||
return neg ? spirit::detail::changesign(n) : n;
|
||||
return neg ? (core::copysign)(n, static_cast<long double>(-1)) : n;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -164,9 +165,33 @@ namespace boost { namespace spirit { namespace traits
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(version)
|
||||
|
||||
template <typename T, typename RealPolicies>
|
||||
struct real_impl
|
||||
{
|
||||
template <typename Iterator>
|
||||
static std::size_t
|
||||
ignore_excess_digits(Iterator& /* first */, Iterator const& /* last */, mpl::false_)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
static std::size_t
|
||||
ignore_excess_digits(Iterator& first, Iterator const& last, mpl::true_)
|
||||
{
|
||||
return RealPolicies::ignore_excess_digits(first, last);
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
static std::size_t
|
||||
ignore_excess_digits(Iterator& first, Iterator const& last)
|
||||
{
|
||||
typedef mpl::bool_<has_version<RealPolicies>::value> has_version;
|
||||
return ignore_excess_digits(first, last, has_version());
|
||||
}
|
||||
|
||||
template <typename Iterator, typename Attribute>
|
||||
static bool
|
||||
parse(Iterator& first, Iterator const& last, Attribute& attr,
|
||||
@@ -185,6 +210,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
|
||||
typename traits::real_accumulator<T>::type acc_n = 0;
|
||||
bool got_a_number = p.parse_n(first, last, acc_n);
|
||||
int excess_n = 0;
|
||||
|
||||
// If we did not get a number it might be a NaN, Inf or a leading
|
||||
// dot.
|
||||
@@ -207,6 +233,12 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We got a number and we still see digits. This happens if acc_n (an integer)
|
||||
// exceeds the integer's capacity. Collect the excess digits.
|
||||
excess_n = static_cast<int>(ignore_excess_digits(first, last));
|
||||
}
|
||||
|
||||
bool e_hit = false;
|
||||
Iterator e_pos;
|
||||
@@ -218,7 +250,12 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
// We got the decimal point. Now we will try to parse
|
||||
// the fraction if it is there. If not, it defaults
|
||||
// to zero (0) only if we already got a number.
|
||||
if (p.parse_frac_n(first, last, acc_n, frac_digits))
|
||||
if (excess_n != 0)
|
||||
{
|
||||
// We skip the fractions if we already exceeded our digits capacity
|
||||
ignore_excess_digits(first, last);
|
||||
}
|
||||
else if (p.parse_frac_n(first, last, acc_n, frac_digits))
|
||||
{
|
||||
BOOST_ASSERT(frac_digits >= 0);
|
||||
}
|
||||
@@ -263,8 +300,8 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
if (p.parse_exp_n(first, last, exp))
|
||||
{
|
||||
// Got the exponent value. Scale the number by
|
||||
// exp-frac_digits.
|
||||
if (!traits::scale(exp, frac_digits, n, acc_n))
|
||||
// exp + excess_n - frac_digits.
|
||||
if (!traits::scale(exp + excess_n, frac_digits, n, acc_n))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -285,7 +322,15 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
}
|
||||
else
|
||||
{
|
||||
n = static_cast<T>(acc_n);
|
||||
if (excess_n)
|
||||
{
|
||||
if (!traits::scale(excess_n, n, acc_n))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
n = static_cast<T>(acc_n);
|
||||
}
|
||||
}
|
||||
|
||||
// If we got a negative sign, negate the number
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2001-2019 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Hartmut Kaiser
|
||||
|
||||
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_REAL_POLICIES_APRIL_17_2006_1158PM)
|
||||
#define SPIRIT_REAL_POLICIES_APRIL_17_2006_1158PM
|
||||
#ifndef BOOST_SPIRIT_QI_NUMERIC_REAL_POLICIES_HPP
|
||||
#define BOOST_SPIRIT_QI_NUMERIC_REAL_POLICIES_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -14,6 +14,29 @@
|
||||
|
||||
#include <boost/spirit/home/qi/numeric/numeric_utils.hpp>
|
||||
#include <boost/spirit/home/qi/detail/string_parse.hpp>
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
|
||||
namespace boost { namespace spirit { namespace traits
|
||||
{
|
||||
// So that we won't exceed the capacity of the underlying type T,
|
||||
// we limit the number of digits parsed to its max_digits10.
|
||||
// By default, the value is -1 which tells spirit to parse an
|
||||
// unbounded number of digits.
|
||||
|
||||
template <typename T, typename Enable = void>
|
||||
struct max_digits10
|
||||
{
|
||||
static int const value = -1; // unbounded
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct max_digits10<T
|
||||
, typename enable_if_c<(is_floating_point<T>::value)>::type>
|
||||
{
|
||||
static int const digits = std::numeric_limits<T>::digits;
|
||||
static int const value = 2 + (digits * 30103l) / 100000l;
|
||||
};
|
||||
}}}
|
||||
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
@@ -23,6 +46,9 @@ namespace boost { namespace spirit { namespace qi
|
||||
template <typename T>
|
||||
struct ureal_policies
|
||||
{
|
||||
// Versioning
|
||||
typedef mpl::int_<2> version;
|
||||
|
||||
// trailing dot policy suggested by Gustavo Guerra
|
||||
static bool const allow_leading_dot = true;
|
||||
static bool const allow_trailing_dot = true;
|
||||
@@ -39,7 +65,22 @@ namespace boost { namespace spirit { namespace qi
|
||||
static bool
|
||||
parse_n(Iterator& first, Iterator const& last, Attribute& attr_)
|
||||
{
|
||||
return extract_uint<Attribute, 10, 1, -1>::call(first, last, attr_);
|
||||
typedef extract_uint<Attribute, 10, 1
|
||||
, traits::max_digits10<T>::value // See notes on max_digits10 above
|
||||
, false, true>
|
||||
extract_uint;
|
||||
return extract_uint::call(first, last, attr_);
|
||||
}
|
||||
|
||||
// ignore_excess_digits (required for version > 1 API)
|
||||
template <typename Iterator>
|
||||
static std::size_t
|
||||
ignore_excess_digits(Iterator& first, Iterator const& last)
|
||||
{
|
||||
Iterator save = first;
|
||||
if (extract_uint<unused_type, 10, 1, -1>::call(first, last, unused))
|
||||
return static_cast<std::size_t>(std::distance(save, first));
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
@@ -60,11 +101,18 @@ namespace boost { namespace spirit { namespace qi
|
||||
bool r = extract_uint<Attribute, 10, 1, -1, true, true>::call(first, last, attr_);
|
||||
if (r)
|
||||
{
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4127) // conditional expression is constant
|
||||
#endif
|
||||
// Optimization note: don't compute frac_digits if T is
|
||||
// an unused_type. This should be optimized away by the compiler.
|
||||
if (!is_same<T, unused_type>::value)
|
||||
frac_digits =
|
||||
static_cast<int>(std::distance(savef, first));
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
// ignore extra (non-significant digits)
|
||||
extract_uint<unused_type, 10, 1, -1>::call(first, last, unused);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
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_UINT_APR_17_2006_0901AM)
|
||||
#define SPIRIT_UINT_APR_17_2006_0901AM
|
||||
#ifndef BOOST_SPIRIT_QI_NUMERIC_UINT_HPP
|
||||
#define BOOST_SPIRIT_QI_NUMERIC_UINT_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_ALTERNATIVE_FEBRUARY_05_2007_1153AM)
|
||||
#define SPIRIT_ALTERNATIVE_FEBRUARY_05_2007_1153AM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_ALTERNATIVE_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_ALTERNATIVE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <boost/fusion/include/any.hpp>
|
||||
#include <boost/fusion/include/mpl.hpp>
|
||||
#include <boost/fusion/include/for_each.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_AND_PREDICATE_MARCH_23_2007_0617PM)
|
||||
#define SPIRIT_AND_PREDICATE_MARCH_23_2007_0617PM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_AND_PREDICATE_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_AND_PREDICATE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <boost/spirit/home/support/has_semantic_action.hpp>
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/fusion/include/at.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_DIFFERENCE_FEBRUARY_11_2007_1250PM)
|
||||
#define SPIRIT_DIFFERENCE_FEBRUARY_11_2007_1250PM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_DIFFERENCE_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_DIFFERENCE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <boost/spirit/home/support/has_semantic_action.hpp>
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/fusion/include/at.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_EXPECT_APRIL_29_2007_0445PM)
|
||||
#define SPIRIT_EXPECT_APRIL_29_2007_0445PM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_EXPECT_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_EXPECT_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <boost/spirit/home/support/has_semantic_action.hpp>
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_KLEENE_JANUARY_07_2007_0818AM)
|
||||
#define SPIRIT_KLEENE_JANUARY_07_2007_0818AM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_KLEENE_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_KLEENE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <boost/spirit/home/support/has_semantic_action.hpp>
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_LIST_MARCH_24_2007_1031AM)
|
||||
#define SPIRIT_LIST_MARCH_24_2007_1031AM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_LIST_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_LIST_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <boost/spirit/home/support/has_semantic_action.hpp>
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_NOT_PREDICATE_MARCH_23_2007_0618PM)
|
||||
#define SPIRIT_NOT_PREDICATE_MARCH_23_2007_0618PM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_NOT_PREDICATE_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_NOT_PREDICATE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <boost/spirit/home/support/has_semantic_action.hpp>
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_OPTIONAL_MARCH_23_2007_1117PM)
|
||||
#define SPIRIT_OPTIONAL_MARCH_23_2007_1117PM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_OPTIONAL_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_OPTIONAL_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <boost/spirit/home/qi/meta_compiler.hpp>
|
||||
#include <boost/spirit/home/qi/detail/assign_to.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_PERMUTATION_OR_MARCH_13_2007_1145PM)
|
||||
#define SPIRIT_PERMUTATION_OR_MARCH_13_2007_1145PM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_PERMUTATION_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_PERMUTATION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <boost/fusion/include/size.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_PLUS_MARCH_13_2007_0127PM)
|
||||
#define SPIRIT_PLUS_MARCH_13_2007_0127PM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_PLUS_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_PLUS_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <boost/spirit/home/support/has_semantic_action.hpp>
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_SEQUENCE_APR_22_2006_0811AM)
|
||||
#define SPIRIT_SEQUENCE_APR_22_2006_0811AM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <boost/spirit/home/qi/operator/sequence_base.hpp>
|
||||
#include <boost/spirit/home/qi/detail/fail_function.hpp>
|
||||
#include <boost/spirit/home/qi/meta_compiler.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
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_SEQUENCE_BASE_APRIL_22_2006_0811AM)
|
||||
#define SPIRIT_SEQUENCE_BASE_APRIL_22_2006_0811AM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_BASE_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_BASE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
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_SEQUENTIAL_OR_MARCH_12_2007_1130PM)
|
||||
#define SPIRIT_SEQUENTIAL_OR_MARCH_12_2007_1130PM
|
||||
#ifndef BOOST_SPIRIT_QI_OPERATOR_SEQUENTIAL_OR_HPP
|
||||
#define BOOST_SPIRIT_QI_OPERATOR_SEQUENTIAL_OR_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <boost/spirit/home/support/handles_container.hpp>
|
||||
#include <boost/fusion/include/as_vector.hpp>
|
||||
#include <boost/fusion/include/for_each.hpp>
|
||||
#include <boost/proto/operators.hpp>
|
||||
#include <boost/proto/tags.hpp>
|
||||
|
||||
namespace boost { namespace spirit
|
||||
{
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Hartmut Kaiser
|
||||
|
||||
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(BOOST_SPIRIT_ITERATOR_ISTREAM_MAY_05_2007_0110PM)
|
||||
#define BOOST_SPIRIT_ITERATOR_ISTREAM_MAY_05_2007_0110PM
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/iostreams/stream.hpp>
|
||||
#include <iterator> // for std::iterator_traits, std::distance
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename Iterator>
|
||||
struct base_iterator_source
|
||||
{
|
||||
typedef typename std::iterator_traits<Iterator>::value_type char_type;
|
||||
typedef boost::iostreams::seekable_device_tag category;
|
||||
|
||||
base_iterator_source (Iterator const& first_, Iterator const& last_)
|
||||
: first(first_), last(last_), pos(0)
|
||||
{}
|
||||
|
||||
// Read up to n characters from the input sequence into the buffer s,
|
||||
// returning the number of characters read, or -1 to indicate
|
||||
// end-of-sequence.
|
||||
std::streamsize read (char_type* s, std::streamsize n)
|
||||
{
|
||||
if (first == last)
|
||||
return -1;
|
||||
|
||||
std::streamsize bytes_read = 0;
|
||||
while (n--) {
|
||||
*s = *first;
|
||||
++s; ++bytes_read;
|
||||
if (++first == last)
|
||||
break;
|
||||
}
|
||||
|
||||
pos += bytes_read;
|
||||
return bytes_read;
|
||||
}
|
||||
|
||||
// Write is implemented only to satisfy the requirements of a
|
||||
// boost::iostreams::seekable_device. We need to have see support to
|
||||
// be able to figure out how many characters have been actually
|
||||
// consumed by the stream.
|
||||
std::streamsize write(const char_type*, std::streamsize)
|
||||
{
|
||||
BOOST_ASSERT(false); // not supported
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::streampos seek(boost::iostreams::stream_offset, std::ios_base::seekdir way)
|
||||
{
|
||||
(void)way;
|
||||
BOOST_ASSERT(way == std::ios_base::cur); // only support queries
|
||||
return pos; // return current position
|
||||
}
|
||||
|
||||
Iterator first;
|
||||
Iterator const& last;
|
||||
std::streamsize pos;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
base_iterator_source& operator= (base_iterator_source const&);
|
||||
};
|
||||
|
||||
template <typename Iterator, typename Enable = void>
|
||||
struct iterator_source : base_iterator_source<Iterator>
|
||||
{
|
||||
typedef base_iterator_source<Iterator> base_type;
|
||||
|
||||
iterator_source (Iterator const& first_, Iterator const& last_)
|
||||
: base_type(first_, last_) {}
|
||||
};
|
||||
|
||||
// Specialization for random-access iterators. This also allows compilers
|
||||
// to fully optimize the case when the source range is contiguous
|
||||
template <typename Iterator>
|
||||
struct iterator_source<
|
||||
Iterator,
|
||||
typename boost::enable_if_c<boost::is_convertible<
|
||||
typename std::iterator_traits<Iterator>::iterator_category, std::random_access_iterator_tag>::value>::type
|
||||
> : base_iterator_source<Iterator>
|
||||
{
|
||||
typedef base_iterator_source<Iterator> base_type;
|
||||
|
||||
iterator_source (Iterator const& first_, Iterator const& last_)
|
||||
: base_type(first_, last_) {}
|
||||
|
||||
typedef typename base_type::char_type char_type;
|
||||
using base_type::first;
|
||||
using base_type::last;
|
||||
using base_type::pos;
|
||||
|
||||
// Read up to n characters from the input sequence into the buffer s,
|
||||
// returning the number of characters read, or -1 to indicate
|
||||
// end-of-sequence.
|
||||
std::streamsize read (char_type* s, std::streamsize n)
|
||||
{
|
||||
if (first == last)
|
||||
return -1;
|
||||
|
||||
n = (std::min)(static_cast<std::streamsize>(last - first), n);
|
||||
|
||||
typedef typename std::iterator_traits<Iterator>::difference_type diff_type;
|
||||
|
||||
// copy_n is only part of c++11, so emulate it
|
||||
std::copy(first, first + static_cast<diff_type>(n), s);
|
||||
first += static_cast<diff_type>(n);
|
||||
pos += n;
|
||||
|
||||
return n;
|
||||
}
|
||||
};
|
||||
|
||||
}}}}
|
||||
|
||||
#endif
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
#include <iosfwd>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
|
||||
@@ -23,6 +24,10 @@
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename Expr
|
||||
, typename CopyExpr = mpl::false_, typename CopyAttr = mpl::false_
|
||||
, typename Skipper = unused_type, typename Attribute = unused_type const>
|
||||
@@ -45,10 +50,6 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Skipper const& skipper;
|
||||
Attribute& attr;
|
||||
BOOST_SCOPED_ENUM(skip_flag) const post_skip;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
match_manip& operator= (match_manip const&);
|
||||
};
|
||||
|
||||
template <typename Expr, typename Skipper, typename Attribute>
|
||||
@@ -65,10 +66,6 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Skipper const& skipper;
|
||||
Attribute attr;
|
||||
BOOST_SCOPED_ENUM(skip_flag) const post_skip;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
match_manip& operator= (match_manip const&);
|
||||
};
|
||||
|
||||
template <typename Expr, typename Skipper, typename Attribute>
|
||||
@@ -85,11 +82,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
Skipper const& skipper;
|
||||
Attribute& attr;
|
||||
BOOST_SCOPED_ENUM(skip_flag) const post_skip;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
match_manip& operator= (match_manip const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename Expr, typename Enable = void>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <boost/spirit/home/qi/parser.hpp>
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/spirit/home/qi/stream/detail/match_manip.hpp>
|
||||
#include <iosfwd>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
|
||||
#include <boost/spirit/home/qi/detail/string_parse.hpp>
|
||||
#include <boost/spirit/home/qi/stream/detail/match_manip.hpp>
|
||||
#include <boost/spirit/home/qi/stream/detail/iterator_source.hpp>
|
||||
#include <boost/spirit/home/support/detail/hold_any.hpp>
|
||||
|
||||
#include <iosfwd>
|
||||
#include <sstream>
|
||||
#include <boost/proto/traits.hpp>
|
||||
#include <istream>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost { namespace spirit
|
||||
@@ -44,6 +42,41 @@ namespace boost { namespace spirit { namespace qi
|
||||
using spirit::stream_type;
|
||||
using spirit::wstream_type;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
template <typename Iterator>
|
||||
struct psbuf
|
||||
: std::basic_streambuf<typename std::iterator_traits<Iterator>::value_type>
|
||||
{
|
||||
psbuf(Iterator first_, Iterator const& last_)
|
||||
: first(first_), last(last_) {}
|
||||
|
||||
protected:
|
||||
typename psbuf::int_type underflow() BOOST_OVERRIDE
|
||||
{
|
||||
return first == last ? psbuf::traits_type::eof()
|
||||
: psbuf::traits_type::to_int_type(*first);
|
||||
}
|
||||
|
||||
typename psbuf::int_type uflow() BOOST_OVERRIDE
|
||||
{
|
||||
return first == last ? psbuf::traits_type::eof()
|
||||
: psbuf::traits_type::to_int_type(*first++);
|
||||
}
|
||||
|
||||
public:
|
||||
Iterator first;
|
||||
Iterator const& last;
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename Char = char, typename T = spirit::basic_hold_any<char> >
|
||||
struct stream_parser
|
||||
: primitive_parser<stream_parser<Char, T> >
|
||||
@@ -60,25 +93,15 @@ namespace boost { namespace spirit { namespace qi
|
||||
, Context& /*context*/, Skipper const& skipper
|
||||
, Attribute& attr_) const
|
||||
{
|
||||
typedef qi::detail::iterator_source<Iterator> source_device;
|
||||
typedef boost::iostreams::stream<source_device> instream;
|
||||
|
||||
qi::skip_over(first, last, skipper);
|
||||
|
||||
instream in(first, last); // copies 'first'
|
||||
detail::psbuf<Iterator> pseudobuf(first, last);
|
||||
std::basic_istream<Char> in(&pseudobuf);
|
||||
in >> attr_; // use existing operator>>()
|
||||
|
||||
// advance the iterator if everything is ok
|
||||
if (in) {
|
||||
if (!in.eof()) {
|
||||
typedef typename
|
||||
boost::iterator_difference<Iterator>::type diff_type;
|
||||
|
||||
diff_type pos = static_cast<diff_type>(in.tellg());
|
||||
std::advance(first, pos);
|
||||
} else {
|
||||
first = last;
|
||||
}
|
||||
first = pseudobuf.first;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <boost/call_traits.hpp>
|
||||
#include <iterator> // for std::iterator_traits
|
||||
#include <string>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi { namespace detail
|
||||
{
|
||||
|
||||
@@ -117,10 +117,6 @@ namespace boost { namespace spirit { namespace qi
|
||||
}
|
||||
|
||||
String str;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
literal_string& operator= (literal_string const&);
|
||||
};
|
||||
|
||||
template <typename String, bool no_attribute>
|
||||
@@ -138,7 +134,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
, str_hi(in)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
encoding; // suppresses warning: C4100: 'encoding' : unreferenced formal parameter
|
||||
(void)encoding; // suppresses warning: C4100: 'encoding' : unreferenced formal parameter
|
||||
#endif
|
||||
typename string_type::iterator loi = str_lo.begin();
|
||||
typename string_type::iterator hii = str_hi.begin();
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
#include <boost/spirit/home/support/info.hpp>
|
||||
#include <boost/spirit/home/support/unused.hpp>
|
||||
#include <boost/spirit/home/support/string_traits.hpp>
|
||||
|
||||
#include <boost/proto/extends.hpp>
|
||||
#include <boost/proto/traits.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
@@ -284,6 +285,10 @@ public:
|
||||
return name_;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
struct adder
|
||||
{
|
||||
template <typename, typename = unused_type, typename = unused_type>
|
||||
@@ -321,10 +326,6 @@ public:
|
||||
}
|
||||
|
||||
symbols& sym;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
adder& operator= (adder const&);
|
||||
};
|
||||
|
||||
struct remover
|
||||
@@ -364,11 +365,10 @@ public:
|
||||
}
|
||||
|
||||
symbols& sym;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
remover& operator= (remover const&);
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
adder add;
|
||||
remover remove;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <boost/spirit/home/qi/string/detail/tst.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/pool/object_pool.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
@@ -133,11 +132,12 @@ namespace boost { namespace spirit { namespace qi
|
||||
|
||||
void clear()
|
||||
{
|
||||
BOOST_FOREACH(typename map_type::value_type& x, map)
|
||||
typedef typename map_type::iterator iter_t;
|
||||
for (iter_t it = map.begin(), end = map.end(); it != end; ++it)
|
||||
{
|
||||
node::destruct_node(x.second.root, this);
|
||||
if (x.second.data)
|
||||
this->delete_data(x.second.data);
|
||||
node::destruct_node(it->second.root, this);
|
||||
if (it->second.data)
|
||||
this->delete_data(it->second.data);
|
||||
}
|
||||
map.clear();
|
||||
}
|
||||
@@ -145,12 +145,13 @@ namespace boost { namespace spirit { namespace qi
|
||||
template <typename F>
|
||||
void for_each(F f) const
|
||||
{
|
||||
BOOST_FOREACH(typename map_type::value_type const& x, map)
|
||||
typedef typename map_type::const_iterator iter_t;
|
||||
for (iter_t it = map.begin(), end = map.end(); it != end; ++it)
|
||||
{
|
||||
std::basic_string<Char> s(1, x.first);
|
||||
node::for_each(x.second.root, s, f);
|
||||
if (x.second.data)
|
||||
f(s, *x.second.data);
|
||||
std::basic_string<Char> s(1, it->first);
|
||||
node::for_each(it->second.root, s, f);
|
||||
if (it->second.data)
|
||||
f(s, *it->second.data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,12 +169,13 @@ namespace boost { namespace spirit { namespace qi
|
||||
|
||||
void copy(tst_map const& rhs)
|
||||
{
|
||||
BOOST_FOREACH(typename map_type::value_type const& x, rhs.map)
|
||||
typedef typename map_type::const_iterator iter_t;
|
||||
for (iter_t it = rhs.map.begin(), end = rhs.map.end(); it != end; ++it)
|
||||
{
|
||||
map_data xx = {node::clone_node(x.second.root, this), 0};
|
||||
if (x.second.data)
|
||||
xx.data = data_pool.construct(*x.second.data);
|
||||
map[x.first] = xx;
|
||||
map_data xx = {node::clone_node(it->second.root, this), 0};
|
||||
if (it->second.data)
|
||||
xx.data = data_pool.construct(*it->second.data);
|
||||
map[it->first] = xx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,9 +183,10 @@ namespace boost { namespace spirit { namespace qi
|
||||
{
|
||||
if (this != &rhs)
|
||||
{
|
||||
BOOST_FOREACH(typename map_type::value_type& x, map)
|
||||
typedef typename map_type::const_iterator iter_t;
|
||||
for (iter_t it = map.begin(), end = map.end(); it != end; ++it)
|
||||
{
|
||||
node::destruct_node(x.second.root, this);
|
||||
node::destruct_node(it->second.root, this);
|
||||
}
|
||||
map.clear();
|
||||
copy(rhs);
|
||||
|
||||
Reference in New Issue
Block a user