update boost
This commit is contained in:
70
linx64/include/boost/metaparse/v1/cpp98/impl/is_none.hpp
Normal file
70
linx64/include/boost/metaparse/v1/cpp98/impl/is_none.hpp
Normal file
@@ -0,0 +1,70 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP98_IMPL_IS_NONE_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP98_IMPL_IS_NONE_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
|
||||
// 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)
|
||||
|
||||
#include <boost/metaparse/limit_one_char_except_size.hpp>
|
||||
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class Stub = int>
|
||||
struct is_none0
|
||||
{
|
||||
template <class C>
|
||||
struct apply : boost::mpl::true_ {};
|
||||
};
|
||||
|
||||
#ifdef BOOST_METAPARSE_DEFINE_IS_NONE
|
||||
# error BOOST_METAPARSE_DEFINE_IS_NONE already defined
|
||||
#endif
|
||||
#define BOOST_METAPARSE_DEFINE_IS_NONE(z, n, unused) \
|
||||
template <BOOST_PP_ENUM_PARAMS(n, class T)> \
|
||||
struct BOOST_PP_CAT(is_none, n) \
|
||||
{ \
|
||||
template <class C> \
|
||||
struct apply : \
|
||||
boost::mpl::eval_if< \
|
||||
boost::mpl::bool_< \
|
||||
C::type::value \
|
||||
== BOOST_PP_CAT(T, BOOST_PP_DEC(n))::type::value \
|
||||
>, \
|
||||
boost::mpl::false_, \
|
||||
typename BOOST_PP_CAT(is_none, BOOST_PP_DEC(n))< \
|
||||
BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(n), T) \
|
||||
>::template apply<C> \
|
||||
> \
|
||||
{}; \
|
||||
};
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(
|
||||
1,
|
||||
BOOST_METAPARSE_LIMIT_ONE_CHAR_EXCEPT_SIZE,
|
||||
BOOST_METAPARSE_DEFINE_IS_NONE,
|
||||
~
|
||||
)
|
||||
|
||||
#undef BOOST_METAPARSE_DEFINE_IS_NONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP98_IMPL_LATER_RESULT_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP98_IMPL_LATER_RESULT_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
|
||||
// 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)
|
||||
|
||||
#include <boost/metaparse/v1/get_position.hpp>
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/less.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class R1, class R2>
|
||||
struct later_result :
|
||||
boost::mpl::if_<
|
||||
typename boost::mpl::less<
|
||||
typename get_position<R2>::type,
|
||||
typename get_position<R1>::type
|
||||
>::type,
|
||||
R1,
|
||||
R2
|
||||
>
|
||||
{};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP98_IMPL_ONE_CHAR_EXCEPT_NOT_USED_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP98_IMPL_ONE_CHAR_EXCEPT_NOT_USED_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
|
||||
// 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)
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
struct one_char_except_not_used {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
44
linx64/include/boost/metaparse/v1/cpp98/impl/one_of.hpp
Normal file
44
linx64/include/boost/metaparse/v1/cpp98/impl/one_of.hpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef BOOST_METAPARSE_V1_IMPL_ONE_OF_HPP
|
||||
#define BOOST_METAPARSE_V1_IMPL_ONE_OF_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
|
||||
// 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)
|
||||
|
||||
#include <boost/metaparse/v1/error/none_of_the_expected_cases_found.hpp>
|
||||
#include <boost/metaparse/v1/fail.hpp>
|
||||
|
||||
#include <boost/metaparse/v1/cpp98/impl/one_of_fwd_op.hpp>
|
||||
|
||||
#include <boost/mpl/fold.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class Parsers>
|
||||
struct one_of
|
||||
{
|
||||
typedef one_of type;
|
||||
|
||||
template <class S, class Pos>
|
||||
struct apply :
|
||||
boost::mpl::fold<
|
||||
Parsers,
|
||||
fail<error::none_of_the_expected_cases_found>::apply<S, Pos>,
|
||||
one_of_fwd_op<S, Pos>
|
||||
>::type
|
||||
{};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#ifndef BOOST_METAPARSE_V1_IMPL_ONE_OF_FWD_OP_HPP
|
||||
#define BOOST_METAPARSE_V1_IMPL_ONE_OF_FWD_OP_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
|
||||
// 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)
|
||||
|
||||
#include <boost/metaparse/v1/is_error.hpp>
|
||||
#include <boost/metaparse/v1/cpp98/impl/later_result.hpp>
|
||||
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class S, class Pos>
|
||||
struct one_of_fwd_op
|
||||
{
|
||||
typedef one_of_fwd_op type;
|
||||
|
||||
template <class State, class P>
|
||||
struct apply :
|
||||
boost::mpl::eval_if<
|
||||
typename is_error<State>::type,
|
||||
boost::mpl::eval_if<
|
||||
typename is_error<typename P::template apply<S, Pos> >::type,
|
||||
later_result<State, typename P::template apply<S, Pos> >,
|
||||
typename P::template apply<S, Pos>
|
||||
>,
|
||||
State
|
||||
>
|
||||
{};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
59
linx64/include/boost/metaparse/v1/cpp98/impl/sequence.hpp
Normal file
59
linx64/include/boost/metaparse/v1/cpp98/impl/sequence.hpp
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP98_IMPL_SEQUENCE_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP98_IMPL_SEQUENCE_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
|
||||
// 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)
|
||||
|
||||
#include <boost/metaparse/v1/cpp98/impl/sequence_impl.hpp>
|
||||
#include <boost/metaparse/limit_sequence_size.hpp>
|
||||
|
||||
#include <boost/mpl/vector.hpp>
|
||||
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
#ifdef BOOST_METAPARSE_SEQUENCE_CASE
|
||||
# error BOOST_METAPARSE_SEQUENCE_CASE already defined
|
||||
#endif
|
||||
#define BOOST_METAPARSE_SEQUENCE_CASE(z, n, unused) \
|
||||
template <BOOST_PP_ENUM_PARAMS(n, class P)> \
|
||||
struct BOOST_PP_CAT(sequence, n) \
|
||||
{ \
|
||||
typedef BOOST_PP_CAT(sequence, n) type; \
|
||||
\
|
||||
template <class S, class Pos> \
|
||||
struct apply : \
|
||||
sequence_impl< \
|
||||
boost::mpl::vector<BOOST_PP_ENUM_PARAMS(n, P)>, \
|
||||
S, \
|
||||
Pos \
|
||||
> \
|
||||
{}; \
|
||||
};
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(
|
||||
1,
|
||||
BOOST_METAPARSE_LIMIT_SEQUENCE_SIZE,
|
||||
BOOST_METAPARSE_SEQUENCE_CASE,
|
||||
~
|
||||
)
|
||||
|
||||
#undef BOOST_METAPARSE_SEQUENCE_CASE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP98_IMPL_SEQUENCE_IMPL_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP98_IMPL_SEQUENCE_IMPL_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
|
||||
// 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)
|
||||
|
||||
#include <boost/metaparse/v1/impl/apply_parser.hpp>
|
||||
#include <boost/metaparse/v1/accept.hpp>
|
||||
|
||||
#include <boost/mpl/deque.hpp>
|
||||
#include <boost/mpl/fold.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class Ps, class S, class Pos>
|
||||
struct sequence_impl :
|
||||
boost::mpl::fold<
|
||||
Ps,
|
||||
accept<boost::mpl::deque<>, S, Pos>,
|
||||
apply_parser
|
||||
>
|
||||
{};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user