update boost
This commit is contained in:
33
linx64/include/boost/metaparse/v1/cpp11/impl/any_of_c.hpp
Normal file
33
linx64/include/boost/metaparse/v1/cpp11/impl/any_of_c.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_ANY_OF_C_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_ANY_OF_C_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2017.
|
||||
// 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/cpp11/impl/or_c.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <char... Cs>
|
||||
struct any_of_c
|
||||
{
|
||||
typedef any_of_c type;
|
||||
|
||||
template <class Chr>
|
||||
struct apply : or_c<(Chr::type::value == Cs)...> {};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_EVAL_LATER_RESULT_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_EVAL_LATER_RESULT_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2017.
|
||||
// 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/eval_if.hpp>
|
||||
#include <boost/mpl/less.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class R1, class R2>
|
||||
struct eval_later_result :
|
||||
boost::mpl::eval_if<
|
||||
typename boost::mpl::less<
|
||||
typename get_position<R2>::type,
|
||||
typename get_position<R1>::type
|
||||
>::type,
|
||||
R1,
|
||||
R2
|
||||
>
|
||||
{};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
33
linx64/include/boost/metaparse/v1/cpp11/impl/is_none_c.hpp
Normal file
33
linx64/include/boost/metaparse/v1/cpp11/impl/is_none_c.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_IS_NONE_C_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_IS_NONE_C_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2017.
|
||||
// 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/cpp11/impl/is_none_c_impl.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <char... Cs>
|
||||
struct is_none_c
|
||||
{
|
||||
typedef is_none_c type;
|
||||
|
||||
template <class C>
|
||||
struct apply : is_none_c_impl<C::type::value, Cs...> {};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_IS_NONE_C_IMPL_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_IS_NONE_C_IMPL_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2017.
|
||||
// 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/mpl/bool.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <char D, char... Cs>
|
||||
struct is_none_c_impl;
|
||||
|
||||
template <char D>
|
||||
struct is_none_c_impl<D> : boost::mpl::bool_<true> {};
|
||||
|
||||
template <char D, char... Cs>
|
||||
struct is_none_c_impl<D, D, Cs...> : boost::mpl::bool_<false> {};
|
||||
|
||||
template <char D, char C, char... Cs>
|
||||
struct is_none_c_impl<D, C, Cs...> : is_none_c_impl<D, Cs...> {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
36
linx64/include/boost/metaparse/v1/cpp11/impl/or_c.hpp
Normal file
36
linx64/include/boost/metaparse/v1/cpp11/impl/or_c.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_OR_C_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_OR_C_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2017.
|
||||
// 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/mpl/bool.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <bool... Bs>
|
||||
struct or_c;
|
||||
|
||||
template <>
|
||||
struct or_c<> : boost::mpl::false_ {};
|
||||
|
||||
template <bool... Bs>
|
||||
struct or_c<true, Bs...> : boost::mpl::true_ {};
|
||||
|
||||
template <bool... Bs>
|
||||
struct or_c<false, Bs...> : or_c<Bs...> {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_PUSH_FRONT_RESULT_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_PUSH_FRONT_RESULT_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2018.
|
||||
// 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_result.hpp>
|
||||
|
||||
#include <boost/mpl/push_front.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class Value>
|
||||
struct push_front_result
|
||||
{
|
||||
typedef push_front_result type;
|
||||
|
||||
template <class Seq>
|
||||
struct apply :
|
||||
boost::mpl::push_front<Seq, typename get_result<Value>::type>
|
||||
{};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,55 +0,0 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_REMOVE_TRAILING_NO_CHARS_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_REMOVE_TRAILING_NO_CHARS_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/cpp11/string.hpp>
|
||||
#include <boost/metaparse/v1/impl/no_char.hpp>
|
||||
#include <boost/metaparse/v1/cpp11/impl/push_front_c.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class S>
|
||||
struct remove_trailing_no_chars : S {};
|
||||
|
||||
// this code assumes that BOOST_NO_CHARs are at the end of the string
|
||||
template <char... Cs>
|
||||
struct remove_trailing_no_chars<string<BOOST_NO_CHAR, Cs...>> :
|
||||
string<>
|
||||
{};
|
||||
|
||||
template <char C, char... Cs>
|
||||
struct remove_trailing_no_chars<string<C, Cs...>> :
|
||||
push_front_c<typename remove_trailing_no_chars<string<Cs...>>::type,C>
|
||||
{};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/*
|
||||
* These specialisations are needed to avoid an internal compiler error
|
||||
* in Visual C++ 12
|
||||
*/
|
||||
template <char C>
|
||||
struct remove_trailing_no_chars<string<C>> : string<C> {};
|
||||
|
||||
template <>
|
||||
struct remove_trailing_no_chars<string<BOOST_NO_CHAR>> : string<> {};
|
||||
|
||||
template <>
|
||||
struct remove_trailing_no_chars<string<>> : string<> {};
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/metaparse/v1/impl/no_char.hpp>
|
||||
|
||||
#include <boost/metaparse/limit_string_size.hpp>
|
||||
|
||||
namespace boost
|
||||
@@ -19,12 +17,12 @@ namespace boost
|
||||
namespace impl
|
||||
{
|
||||
template <int MaxLen, int Len, class T>
|
||||
constexpr int string_at(const T (&s)[Len], int n)
|
||||
constexpr T string_at(const T (&s)[Len], int n)
|
||||
{
|
||||
// "MaxLen + 1" adds the \0 character of the string literal to the
|
||||
// limit
|
||||
static_assert(Len <= MaxLen + 1, "String literal is too long.");
|
||||
return n >= Len - 1 ? BOOST_NO_CHAR : s[n];
|
||||
return n >= Len - 1 ? T() : s[n];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user