add boost on mac
This commit is contained in:
35
macx64/include/boost/metaparse/v1/cpp11/impl/at_c.hpp
Normal file
35
macx64/include/boost/metaparse/v1/cpp11/impl/at_c.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_AT_C_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_AT_C_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/fwd/string.hpp>
|
||||
|
||||
#include <boost/mpl/char.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class S, int N>
|
||||
struct at_c;
|
||||
|
||||
template <char C, char... Cs, int N>
|
||||
struct at_c<string<C, Cs...>, N> : at_c<string<Cs...>, N - 1> {};
|
||||
|
||||
template <char C, char... Cs>
|
||||
struct at_c<string<C, Cs...>, 0> : boost::mpl::char_<C> {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
30
macx64/include/boost/metaparse/v1/cpp11/impl/concat.hpp
Normal file
30
macx64/include/boost/metaparse/v1/cpp11/impl/concat.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_CONCAT_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_CONCAT_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/fwd/string.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class A, class B>
|
||||
struct concat;
|
||||
|
||||
template <char... As, char... Bs>
|
||||
struct concat<string<As...>, string<Bs...>> : string<As..., Bs...> {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_EMPTY_STRING_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_EMPTY_STRING_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
|
||||
{
|
||||
template <class Ignore = int>
|
||||
struct empty_string
|
||||
{
|
||||
typedef empty_string type;
|
||||
|
||||
static constexpr char value[1] = {0};
|
||||
};
|
||||
|
||||
template <class Ignore>
|
||||
constexpr char empty_string<Ignore>::value[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
82
macx64/include/boost/metaparse/v1/cpp11/impl/nth_of_c.hpp
Normal file
82
macx64/include/boost/metaparse/v1/cpp11/impl/nth_of_c.hpp
Normal file
@@ -0,0 +1,82 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_NTH_OF_C_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_NTH_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/nth_of_c_skip_remaining.hpp>
|
||||
|
||||
#include <boost/metaparse/v1/is_error.hpp>
|
||||
#include <boost/metaparse/v1/get_remaining.hpp>
|
||||
#include <boost/metaparse/v1/get_position.hpp>
|
||||
#include <boost/metaparse/v1/get_result.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <int N, class S, class Pos, class... Ps>
|
||||
struct nth_of_c;
|
||||
|
||||
template <int N, class S, class Pos, class P, class... Ps>
|
||||
struct nth_of_c<N, S, Pos, P, Ps...>
|
||||
{
|
||||
private:
|
||||
template <class NextResult>
|
||||
struct apply_unchecked :
|
||||
nth_of_c<
|
||||
N - 1,
|
||||
typename get_remaining<NextResult>::type,
|
||||
typename get_position<NextResult>::type,
|
||||
Ps...
|
||||
>
|
||||
{};
|
||||
|
||||
public:
|
||||
typedef
|
||||
typename std::conditional<
|
||||
is_error<typename P::template apply<S, Pos>>::type::value,
|
||||
typename P::template apply<S, Pos>,
|
||||
apply_unchecked<typename P::template apply<S, Pos>>
|
||||
>::type::type
|
||||
type;
|
||||
};
|
||||
|
||||
template <class P, class S, class Pos, class... Ps>
|
||||
struct nth_of_c<0, S, Pos, P, Ps...>
|
||||
{
|
||||
private:
|
||||
template <class NextResult>
|
||||
struct apply_unchecked :
|
||||
nth_of_c_skip_remaining<
|
||||
typename get_result<NextResult>::type,
|
||||
typename get_remaining<NextResult>::type,
|
||||
typename get_position<NextResult>::type,
|
||||
Ps...
|
||||
>
|
||||
{};
|
||||
|
||||
public:
|
||||
typedef
|
||||
typename std::conditional<
|
||||
is_error<typename P::template apply<S, Pos>>::type::value,
|
||||
typename P::template apply<S, Pos>,
|
||||
apply_unchecked<typename P::template apply<S, Pos>>
|
||||
>::type::type
|
||||
type;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_NTH_OF_C_SKIP_REMANING_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_NTH_OF_C_SKIP_REMANING_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/is_error.hpp>
|
||||
#include <boost/metaparse/v1/get_remaining.hpp>
|
||||
#include <boost/metaparse/v1/get_position.hpp>
|
||||
#include <boost/metaparse/v1/return_.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class FinalResult, class S, class Pos, class... Ps>
|
||||
struct nth_of_c_skip_remaining;
|
||||
|
||||
template <class FinalResult, class S, class Pos>
|
||||
struct nth_of_c_skip_remaining<FinalResult, S, Pos> :
|
||||
return_<FinalResult>::template apply<S, Pos>
|
||||
{};
|
||||
|
||||
template <class FinalResult, class S, class Pos, class P, class... Ps>
|
||||
struct nth_of_c_skip_remaining<FinalResult, S, Pos, P, Ps...>
|
||||
{
|
||||
private:
|
||||
template <class NextResult>
|
||||
struct apply_unchecked :
|
||||
nth_of_c_skip_remaining<
|
||||
FinalResult,
|
||||
typename get_remaining<NextResult>::type,
|
||||
typename get_position<NextResult>::type,
|
||||
Ps...
|
||||
>
|
||||
{};
|
||||
public:
|
||||
typedef
|
||||
typename std::conditional<
|
||||
is_error<typename P::template apply<S, Pos>>::type::value,
|
||||
typename P::template apply<S, Pos>,
|
||||
apply_unchecked<typename P::template apply<S, Pos>>
|
||||
>::type::type
|
||||
type;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
39
macx64/include/boost/metaparse/v1/cpp11/impl/pop_back.hpp
Normal file
39
macx64/include/boost/metaparse/v1/cpp11/impl/pop_back.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_POP_BACK_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_POP_BACK_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/fwd/string.hpp>
|
||||
#include <boost/metaparse/v1/cpp11/impl/push_front_c.hpp>
|
||||
#include <boost/metaparse/v1/cpp11/impl/size.hpp>
|
||||
|
||||
#include <boost/mpl/clear.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class S>
|
||||
struct pop_back;
|
||||
|
||||
template <char C>
|
||||
struct pop_back<string<C>> : boost::mpl::clear<string<C>> {};
|
||||
|
||||
template <char C, char... Cs>
|
||||
struct pop_back<string<C, Cs...>> :
|
||||
push_front_c<typename pop_back<string<Cs...>>::type, C>
|
||||
{};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
30
macx64/include/boost/metaparse/v1/cpp11/impl/pop_front.hpp
Normal file
30
macx64/include/boost/metaparse/v1/cpp11/impl/pop_front.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_POP_FRONT_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_POP_FRONT_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/fwd/string.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class S>
|
||||
struct pop_front;
|
||||
|
||||
template <char C, char... Cs>
|
||||
struct pop_front<string<C, Cs...>> : string<Cs...> {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
30
macx64/include/boost/metaparse/v1/cpp11/impl/push_back_c.hpp
Normal file
30
macx64/include/boost/metaparse/v1/cpp11/impl/push_back_c.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_PUSH_BACK_C_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_PUSH_BACK_C_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/fwd/string.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class S, char C>
|
||||
struct push_back_c;
|
||||
|
||||
template <char... Cs, char C>
|
||||
struct push_back_c<string<Cs...>, C> : string<Cs..., C> {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_PUSH_FRONT_C_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_PUSH_FRONT_C_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/fwd/string.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class S, char C>
|
||||
struct push_front_c;
|
||||
|
||||
template <char... Cs, char C>
|
||||
struct push_front_c<string<Cs...>, C> : string<C, Cs...> {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#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
|
||||
|
||||
34
macx64/include/boost/metaparse/v1/cpp11/impl/size.hpp
Normal file
34
macx64/include/boost/metaparse/v1/cpp11/impl/size.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_SIZE_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_SIZE_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/fwd/string.hpp>
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <class S>
|
||||
struct size;
|
||||
|
||||
template <char... Cs>
|
||||
struct size<string<Cs...>> : boost::mpl::int_<sizeof...(Cs)> {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
2125
macx64/include/boost/metaparse/v1/cpp11/impl/string.hpp
Normal file
2125
macx64/include/boost/metaparse/v1/cpp11/impl/string.hpp
Normal file
File diff suppressed because one or more lines are too long
41
macx64/include/boost/metaparse/v1/cpp11/impl/string_at.hpp
Normal file
41
macx64/include/boost/metaparse/v1/cpp11/impl/string_at.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef BOOST_METAPARSE_V1_CPP11_IMPL_STRING_AT_HPP
|
||||
#define BOOST_METAPARSE_V1_CPP11_IMPL_STRING_AT_HPP
|
||||
|
||||
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2016.
|
||||
// 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/no_char.hpp>
|
||||
|
||||
#include <boost/metaparse/limit_string_size.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace metaparse
|
||||
{
|
||||
namespace v1
|
||||
{
|
||||
namespace impl
|
||||
{
|
||||
template <int MaxLen, int Len, class T>
|
||||
constexpr int 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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_METAPARSE_V1_STRING_AT
|
||||
# error BOOST_METAPARSE_V1_STRING_AT already defined
|
||||
#endif
|
||||
#define BOOST_METAPARSE_V1_STRING_AT \
|
||||
::boost::metaparse::v1::impl::string_at<BOOST_METAPARSE_LIMIT_STRING_SIZE>
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user