mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-05 15:07:49 +00:00
Added thirdparty: boost library
This commit is contained in:
+91
@@ -0,0 +1,91 @@
|
||||
// Copyright Daniel Wallin 2006.
|
||||
// Copyright Cromwell D. Enage 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)
|
||||
|
||||
#ifndef BOOST_PARAMETER_AUX_PP_IMPL_ARGUMENT_PACK_HPP
|
||||
#define BOOST_PARAMETER_AUX_PP_IMPL_ARGUMENT_PACK_HPP
|
||||
|
||||
#include <boost/parameter/aux_/pack/tag_keyword_arg.hpp>
|
||||
#include <boost/parameter/aux_/pack/make_arg_list.hpp>
|
||||
#include <boost/parameter/config.hpp>
|
||||
|
||||
#if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
|
||||
#include <boost/parameter/aux_/pack/make_parameter_spec_items.hpp>
|
||||
|
||||
#if defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/mp11/list.hpp>
|
||||
#else
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/pair.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
template <typename Parameters, typename ...Args>
|
||||
struct argument_pack
|
||||
{
|
||||
typedef typename ::boost::parameter::aux::make_arg_list<
|
||||
typename ::boost::parameter::aux::make_parameter_spec_items<
|
||||
typename Parameters::parameter_spec
|
||||
, Args...
|
||||
>::type
|
||||
, typename Parameters::deduced_list
|
||||
, ::boost::parameter::aux::tag_keyword_arg
|
||||
#if defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
, ::boost::mp11::mp_false
|
||||
#else
|
||||
, ::boost::mpl::false_
|
||||
#endif
|
||||
>::type result;
|
||||
#if defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
using type = ::boost::mp11::mp_at_c<result,0>;
|
||||
#else
|
||||
typedef typename ::boost::mpl::first<result>::type type;
|
||||
#endif
|
||||
};
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#else // !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
|
||||
#include <boost/parameter/aux_/void.hpp>
|
||||
#include <boost/parameter/aux_/pack/make_items.hpp>
|
||||
#include <boost/parameter/aux_/preprocessor/no_perfect_forwarding_begin.hpp>
|
||||
#include <boost/preprocessor/facilities/intercept.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/pair.hpp>
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
template <
|
||||
typename Parameters
|
||||
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
|
||||
BOOST_PARAMETER_MAX_ARITY
|
||||
, typename A
|
||||
, = ::boost::parameter::void_ BOOST_PP_INTERCEPT
|
||||
)
|
||||
>
|
||||
struct argument_pack
|
||||
{
|
||||
typedef typename ::boost::parameter::aux::make_arg_list<
|
||||
typename BOOST_PARAMETER_build_arg_list(
|
||||
BOOST_PARAMETER_MAX_ARITY
|
||||
, ::boost::parameter::aux::make_items
|
||||
, typename Parameters::parameter_spec
|
||||
, A
|
||||
)::type
|
||||
, typename Parameters::deduced_list
|
||||
, ::boost::parameter::aux::tag_keyword_arg
|
||||
, ::boost::mpl::false_
|
||||
>::type result;
|
||||
typedef typename ::boost::mpl::first<result>::type type;
|
||||
};
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#include <boost/parameter/aux_/preprocessor/no_perfect_forwarding_end.hpp>
|
||||
|
||||
#endif // BOOST_PARAMETER_HAS_PERFECT_FORWARDING
|
||||
#endif // include guard
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
// Copyright Daniel Wallin 2006.
|
||||
// Copyright Cromwell D. Enage 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)
|
||||
|
||||
#ifndef BOOST_PARAMETER_AUX_PP_IMPL_MATCH_HPP
|
||||
#define BOOST_PARAMETER_AUX_PP_IMPL_MATCH_HPP
|
||||
|
||||
#include <boost/parameter/config.hpp>
|
||||
|
||||
#if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING)
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
// Recast the ParameterSpec's nested match metafunction
|
||||
// as a free metafunction.
|
||||
//
|
||||
// No more limits set by BOOST_PARAMETER_MAX_ARITY. -- Cromwell D. Enage
|
||||
template <typename Parameters, typename ...Args>
|
||||
struct match : Parameters::BOOST_NESTED_TEMPLATE match<Args...>
|
||||
{
|
||||
};
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/parameter/aux_/void.hpp>
|
||||
#include <boost/preprocessor/facilities/intercept.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
// Recast the ParameterSpec's nested match metafunction
|
||||
// as a free metafunction.
|
||||
template <
|
||||
typename Parameters
|
||||
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
|
||||
BOOST_PARAMETER_MAX_ARITY
|
||||
, typename A
|
||||
, = ::boost::parameter::void_ BOOST_PP_INTERCEPT
|
||||
)
|
||||
>
|
||||
struct match
|
||||
: Parameters::BOOST_NESTED_TEMPLATE match<
|
||||
BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, A)
|
||||
>
|
||||
{
|
||||
};
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#endif // BOOST_PARAMETER_HAS_PERFECT_FORWARDING
|
||||
#endif // include guard
|
||||
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
// Copyright Daniel Wallin 2006.
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_PARAMETER_AUX_PP_IMPL_UNWRAP_PREDICATE_HPP
|
||||
#define BOOST_PARAMETER_AUX_PP_IMPL_UNWRAP_PREDICATE_HPP
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
// Given Match, which is "void x" where x is an argument matching
|
||||
// criterion, extract a corresponding MPL predicate.
|
||||
template <typename Match>
|
||||
struct unwrap_predicate;
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#include <boost/parameter/aux_/always_true_predicate.hpp>
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
// Match anything
|
||||
template <>
|
||||
struct unwrap_predicate<void*>
|
||||
{
|
||||
typedef ::boost::parameter::aux::always_true_predicate type;
|
||||
};
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#include <boost/parameter/config.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
|
||||
#include <boost/parameter/aux_/void.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
// A matching predicate is explicitly specified.
|
||||
#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
|
||||
template <typename Predicate>
|
||||
struct unwrap_predicate< ::boost::parameter::aux::voidstar(Predicate)>
|
||||
{
|
||||
typedef Predicate type;
|
||||
};
|
||||
#else
|
||||
template <typename Predicate>
|
||||
struct unwrap_predicate<void *(Predicate)>
|
||||
{
|
||||
typedef Predicate type;
|
||||
};
|
||||
#endif // SunProCC workarounds needed.
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#if defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
#include <type_traits>
|
||||
#else
|
||||
#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
// A type to which the argument is supposed to be convertible is
|
||||
// specified.
|
||||
template <typename Target>
|
||||
struct unwrap_predicate<void (Target)>
|
||||
{
|
||||
#if defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
struct type
|
||||
{
|
||||
template <typename Argument, typename ArgumentPack>
|
||||
struct apply
|
||||
: ::boost::mpl::if_<
|
||||
::std::is_convertible<Argument,Target>
|
||||
, ::boost::mpl::true_
|
||||
, ::boost::mpl::false_
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename Argument, typename ArgumentPack>
|
||||
using fn = ::std::is_convertible<Argument,Target>;
|
||||
};
|
||||
#else
|
||||
typedef ::boost::mpl::if_<
|
||||
::boost::is_convertible< ::boost::mpl::_,Target>
|
||||
, ::boost::mpl::true_
|
||||
, ::boost::mpl::false_
|
||||
> type;
|
||||
#endif // BOOST_PARAMETER_CAN_USE_MP11
|
||||
};
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#endif // include guard
|
||||
|
||||
Reference in New Issue
Block a user