Lesson 35 - Get Compute Auth Token Working
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
|
||||
#ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED
|
||||
#define BOOST_MPL_O1_SIZE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/O1_size_fwd.hpp>
|
||||
#include <boost/mpl/sequence_tag.hpp>
|
||||
#include <boost/mpl/aux_/O1_size_impl.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// returns sequence size if it's an O(1) operation; otherwise returns -1
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
>
|
||||
struct O1_size
|
||||
: O1_size_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(1, O1_size)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
#ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Tag > struct O1_size_impl;
|
||||
template< typename Sequence > struct O1_size;
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
#ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED
|
||||
#define BOOST_MPL_ALWAYS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/preprocessor/default_params.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/aux_/arity_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Value > struct always
|
||||
{
|
||||
template<
|
||||
BOOST_MPL_PP_DEFAULT_PARAMS(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, typename T, na)
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef Value type;
|
||||
};
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(0, always)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_ALWAYS_HPP_INCLUDED
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
#ifndef BOOST_MPL_AND_HPP_INCLUDED
|
||||
#define BOOST_MPL_AND_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/aux_/nested_type_wknd.hpp>
|
||||
# include <boost/mpl/aux_/na_spec.hpp>
|
||||
# include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
// agurt, 19/may/04: workaround a conflict with <iso646.h> header's
|
||||
// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)'
|
||||
// has to be checked in a separate condition, otherwise GCC complains
|
||||
// about 'and' being an alternative token
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#ifndef __GCCXML__
|
||||
#if defined(and)
|
||||
# pragma push_macro("and")
|
||||
# undef and
|
||||
# define and(x)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER and.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#ifndef __GCCXML__
|
||||
#if defined(and)
|
||||
# pragma pop_macro("and")
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
# define AUX778076_OP_NAME and_
|
||||
# define AUX778076_OP_VALUE1 false
|
||||
# define AUX778076_OP_VALUE2 true
|
||||
# include <boost/mpl/aux_/logical_op.hpp>
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_AND_HPP_INCLUDED
|
||||
@@ -0,0 +1,229 @@
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_APPLY_HPP_INCLUDED
|
||||
#define BOOST_MPL_APPLY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/apply_fwd.hpp>
|
||||
# include <boost/mpl/apply_wrap.hpp>
|
||||
# include <boost/mpl/placeholders.hpp>
|
||||
# include <boost/mpl/lambda.hpp>
|
||||
# include <boost/mpl/aux_/na.hpp>
|
||||
# include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER apply.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/arity.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
# include <boost/mpl/aux_/config/lambda.hpp>
|
||||
# include <boost/mpl/aux_/config/dtp.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
# include <boost/preprocessor/comma_if.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// local macros, #undef-ined at the end of the header
|
||||
# define AUX778076_APPLY_PARAMS(param) \
|
||||
BOOST_MPL_PP_PARAMS( \
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
|
||||
, param \
|
||||
) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_APPLY_DEF_PARAMS(param, value) \
|
||||
BOOST_MPL_PP_DEFAULT_PARAMS( \
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
|
||||
, param \
|
||||
, value \
|
||||
) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_APPLY_N_PARAMS(n, param) \
|
||||
BOOST_MPL_PP_PARAMS(n, param) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \
|
||||
BOOST_PP_COMMA_IF(n) \
|
||||
BOOST_MPL_PP_PARAMS(n, param) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \
|
||||
BOOST_PP_COMMA_IF(n) \
|
||||
BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \
|
||||
BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
|
||||
// real C++ version is already taken care of
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
namespace aux {
|
||||
// apply_count_args
|
||||
#define AUX778076_COUNT_ARGS_PREFIX apply
|
||||
#define AUX778076_COUNT_ARGS_DEFAULT na
|
||||
#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
#include <boost/mpl/aux_/count_args.hpp>
|
||||
}
|
||||
|
||||
|
||||
template<
|
||||
typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
|
||||
>
|
||||
struct apply
|
||||
: aux::apply_chooser<
|
||||
aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value
|
||||
>::template result_< F, AUX778076_APPLY_PARAMS(T) >::type
|
||||
{
|
||||
};
|
||||
|
||||
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
|
||||
|
||||
# undef AUX778076_APPLY_N_SPEC_PARAMS
|
||||
# undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS
|
||||
# undef AUX778076_APPLY_N_COMMA_PARAMS
|
||||
# undef AUX778076_APPLY_N_PARAMS
|
||||
# undef AUX778076_APPLY_DEF_PARAMS
|
||||
# undef AUX778076_APPLY_PARAMS
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_APPLY_HPP_INCLUDED
|
||||
|
||||
///// iteration, depth == 1
|
||||
|
||||
// For gcc 4.4 compatability, we must include the
|
||||
// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
|
||||
#else // BOOST_PP_IS_ITERATING
|
||||
#if BOOST_PP_ITERATION_DEPTH() == 1
|
||||
|
||||
# define i_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
template<
|
||||
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
|
||||
>
|
||||
struct BOOST_PP_CAT(apply,i_)
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
: BOOST_PP_CAT(apply_wrap,i_)<
|
||||
typename lambda<F>::type
|
||||
AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
|
||||
>
|
||||
{
|
||||
#else
|
||||
{
|
||||
typedef typename BOOST_PP_CAT(apply_wrap,i_)<
|
||||
typename lambda<F>::type
|
||||
AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
|
||||
>::type type;
|
||||
#endif
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
BOOST_PP_INC(i_)
|
||||
, BOOST_PP_CAT(apply,i_)
|
||||
, (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T))
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
/// workaround for ETI bug
|
||||
template<>
|
||||
struct BOOST_PP_CAT(apply,i_)<AUX778076_APPLY_N_SPEC_PARAMS(i_, int)>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
|
||||
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
|
||||
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
/// primary template (not a specialization!)
|
||||
template<
|
||||
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
|
||||
>
|
||||
struct apply
|
||||
: BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >
|
||||
{
|
||||
};
|
||||
#else
|
||||
template<
|
||||
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
|
||||
>
|
||||
struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) >
|
||||
: BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct apply_chooser<i_>
|
||||
{
|
||||
template<
|
||||
typename F, AUX778076_APPLY_PARAMS(typename T)
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef BOOST_PP_CAT(apply,i_)<
|
||||
F AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
#endif
|
||||
|
||||
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
|
||||
|
||||
# undef i_
|
||||
|
||||
#endif // BOOST_PP_ITERATION_DEPTH()
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
@@ -0,0 +1,107 @@
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_APPLY_FWD_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/aux_/na.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/arity.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
|
||||
# include <boost/preprocessor/comma_if.hpp>
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC
|
||||
// (for known reasons)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
# define BOOST_MPL_CFG_NO_APPLY_TEMPLATE
|
||||
#endif
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// local macro, #undef-ined at the end of the header
|
||||
# define AUX778076_APPLY_DEF_PARAMS(param, value) \
|
||||
BOOST_MPL_PP_DEFAULT_PARAMS( \
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
|
||||
, param \
|
||||
, value \
|
||||
) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \
|
||||
BOOST_PP_COMMA_IF(n) \
|
||||
BOOST_MPL_PP_PARAMS(n, param) \
|
||||
/**/
|
||||
|
||||
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
// forward declaration
|
||||
template<
|
||||
typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
|
||||
>
|
||||
struct apply;
|
||||
#else
|
||||
namespace aux {
|
||||
template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser;
|
||||
}
|
||||
#endif
|
||||
|
||||
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_fwd.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
|
||||
# undef AUX778076_APPLY_N_COMMA_PARAMS
|
||||
# undef AUX778076_APPLY_DEF_PARAMS
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED
|
||||
|
||||
///// iteration
|
||||
|
||||
#else
|
||||
#define i_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
template<
|
||||
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
|
||||
>
|
||||
struct BOOST_PP_CAT(apply,i_);
|
||||
|
||||
#undef i_
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
@@ -0,0 +1,234 @@
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
|
||||
#define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2008
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/aux_/arity.hpp>
|
||||
# include <boost/mpl/aux_/has_apply.hpp>
|
||||
# include <boost/mpl/aux_/na.hpp>
|
||||
# include <boost/mpl/aux_/msvc_never_true.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/arity.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/add.hpp>
|
||||
# include <boost/mpl/aux_/config/bcc.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# include <boost/mpl/aux_/config/dtp.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
# include <boost/preprocessor/comma_if.hpp>
|
||||
# include <boost/preprocessor/logical/and.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// local macros, #undef-ined at the end of the header
|
||||
# define AUX778076_APPLY_WRAP_PARAMS(n, param) \
|
||||
BOOST_MPL_PP_PARAMS(n, param) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \
|
||||
BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_wrap.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
|
||||
# undef AUX778076_APPLY_WRAP_SPEC_PARAMS
|
||||
# undef AUX778076_APPLY_WRAP_PARAMS
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
|
||||
|
||||
///// iteration, depth == 1
|
||||
|
||||
// For gcc 4.4 compatability, we must include the
|
||||
// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
|
||||
#else // BOOST_PP_IS_ITERATING
|
||||
#if BOOST_PP_ITERATION_DEPTH() == 1
|
||||
|
||||
# define i_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// MSVC version
|
||||
|
||||
#define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_)
|
||||
#define AUX778076_MSVC_DTW_ORIGINAL_NAME apply
|
||||
#define AUX778076_MSVC_DTW_ARITY i_
|
||||
#include <boost/mpl/aux_/msvc_dtw.hpp>
|
||||
|
||||
template<
|
||||
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
|
||||
>
|
||||
struct BOOST_PP_CAT(apply_wrap,i_)
|
||||
{
|
||||
// Metafunction forwarding confuses vc6
|
||||
typedef typename BOOST_PP_CAT(msvc_apply,i_)<F>::template result_<
|
||||
AUX778076_APPLY_WRAP_PARAMS(i_, T)
|
||||
>::type type;
|
||||
};
|
||||
|
||||
# elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
// MWCW/Borland version
|
||||
|
||||
template<
|
||||
int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
|
||||
>
|
||||
struct BOOST_PP_CAT(apply_wrap_impl,i_);
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_2 \
|
||||
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, <boost/mpl/apply_wrap.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
template<
|
||||
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
|
||||
>
|
||||
struct BOOST_PP_CAT(apply_wrap,i_)
|
||||
: BOOST_PP_CAT(apply_wrap_impl,i_)<
|
||||
::boost::mpl::aux::arity<F,i_>::value
|
||||
, F
|
||||
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
# else
|
||||
// ISO98 C++, with minor concession to vc7
|
||||
|
||||
template<
|
||||
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
|
||||
#if i_ == 0
|
||||
, typename has_apply_ = typename aux::has_apply<F>::type
|
||||
#endif
|
||||
>
|
||||
struct BOOST_PP_CAT(apply_wrap,i_)
|
||||
// metafunction forwarding confuses MSVC 7.0
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||
: F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) >
|
||||
{
|
||||
#else
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
AUX778076_APPLY_WRAP_PARAMS(i_, T)
|
||||
>::type type;
|
||||
#endif
|
||||
};
|
||||
|
||||
#if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
template< typename F >
|
||||
struct BOOST_PP_CAT(apply_wrap,i_)<F,true_>
|
||||
: F::apply
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
# endif // workarounds
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
/// workaround for ETI bug
|
||||
template<>
|
||||
struct BOOST_PP_CAT(apply_wrap,i_)<AUX778076_APPLY_WRAP_SPEC_PARAMS(i_, int)>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
|
||||
# undef i_
|
||||
|
||||
///// iteration, depth == 2
|
||||
|
||||
#elif BOOST_PP_ITERATION_DEPTH() == 2
|
||||
|
||||
# define j_ BOOST_PP_FRAME_ITERATION(2)
|
||||
|
||||
#if i_ == 0 && j_ == 0 \
|
||||
&& defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \
|
||||
&& !defined(BOOST_MPL_CFG_NO_HAS_APPLY)
|
||||
|
||||
template< typename F, bool F_has_apply >
|
||||
struct apply_wrap_impl0_bcb {
|
||||
typedef typename F::template apply< na > type;
|
||||
};
|
||||
|
||||
template< typename F >
|
||||
struct apply_wrap_impl0_bcb< F, true > {
|
||||
typedef typename F::apply type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
|
||||
>
|
||||
struct BOOST_PP_CAT(apply_wrap_impl,i_)<
|
||||
BOOST_MPL_PP_ADD(i_, j_)
|
||||
, F
|
||||
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
|
||||
>
|
||||
{
|
||||
typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type;
|
||||
};
|
||||
#else
|
||||
|
||||
template<
|
||||
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
|
||||
>
|
||||
struct BOOST_PP_CAT(apply_wrap_impl,i_)<
|
||||
BOOST_MPL_PP_ADD(i_, j_)
|
||||
, F
|
||||
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
AUX778076_APPLY_WRAP_PARAMS(i_, T)
|
||||
#if i_ == 0 && j_ == 0
|
||||
/// since the defaults are "lost", we have to pass *something* even for nullary
|
||||
/// metafunction classes
|
||||
na
|
||||
#else
|
||||
BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na)
|
||||
#endif
|
||||
> type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
# undef j_
|
||||
|
||||
#endif // BOOST_PP_ITERATION_DEPTH()
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
131
Plugins/GameLiftPlugin/Source/GameLiftServer/ThirdParty/concurrentqueue/benchmarks/boost/mpl/arg.hpp
vendored
Normal file
131
Plugins/GameLiftPlugin/Source/GameLiftServer/ThirdParty/concurrentqueue/benchmarks/boost/mpl/arg.hpp
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_ARG_HPP_INCLUDED
|
||||
#define BOOST_MPL_ARG_HPP_INCLUDED
|
||||
|
||||
// Copyright Peter Dimov 2001-2002
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/arg_fwd.hpp>
|
||||
# include <boost/mpl/aux_/na.hpp>
|
||||
# include <boost/mpl/aux_/na_assert.hpp>
|
||||
# include <boost/mpl/aux_/arity_spec.hpp>
|
||||
# include <boost/mpl/aux_/arg_typedef.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/arity.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
# include <boost/mpl/aux_/config/lambda.hpp>
|
||||
# include <boost/mpl/aux_/config/dtp.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
|
||||
// local macro, #undef-ined at the end of the header
|
||||
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
|
||||
BOOST_MPL_PP_DEFAULT_PARAMS( \
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
|
||||
, param \
|
||||
, value \
|
||||
) \
|
||||
/**/
|
||||
#else
|
||||
# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
|
||||
BOOST_MPL_PP_PARAMS( \
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
|
||||
, param \
|
||||
) \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/arg.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
|
||||
# undef AUX778076_ARG_N_DEFAULT_PARAMS
|
||||
|
||||
BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg)
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_ARG_HPP_INCLUDED
|
||||
|
||||
///// iteration
|
||||
|
||||
#else
|
||||
#define i_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
#if i_ > 0
|
||||
|
||||
template<> struct arg<i_>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = i_);
|
||||
typedef arg<BOOST_PP_INC(i_)> next;
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
|
||||
|
||||
template<
|
||||
AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef BOOST_PP_CAT(U,i_) type;
|
||||
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
|
||||
};
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template<> struct arg<-1>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = -1);
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
|
||||
|
||||
template<
|
||||
AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef U1 type;
|
||||
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
|
||||
};
|
||||
};
|
||||
|
||||
#endif // i_ > 0
|
||||
|
||||
#undef i_
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
#ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_ARG_FWD_HPP_INCLUDED
|
||||
|
||||
// Copyright Peter Dimov 2001-2002
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/adl_barrier.hpp>
|
||||
#include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg;
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
BOOST_MPL_AUX_ADL_BARRIER_DECL(arg)
|
||||
|
||||
#endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED
|
||||
@@ -0,0 +1,439 @@
|
||||
|
||||
#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED
|
||||
#define BOOST_MPL_ASSERT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/mpl/aux_/value_wknd.hpp>
|
||||
#include <boost/mpl/aux_/nested_type_wknd.hpp>
|
||||
#include <boost/mpl/aux_/yes_no.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/aux_/adl_barrier.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/config/nttp.hpp>
|
||||
#include <boost/mpl/aux_/config/dtp.hpp>
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/gpu.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
#include <boost/mpl/aux_/config/pp_counter.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#include <boost/config.hpp> // make sure 'size_t' is placed into 'std'
|
||||
#include <cstddef>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
|
||||
#include <boost/mpl/if.hpp>
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| (BOOST_MPL_CFG_GCC != 0) \
|
||||
|| BOOST_WORKAROUND(__IBMCPP__, <= 600)
|
||||
# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \
|
||||
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
|
||||
# define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
|
||||
#endif
|
||||
|
||||
// agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants)
|
||||
// and GCC (which issues "unused variable" warnings when static constants are used
|
||||
// at a function scope)
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0)
|
||||
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
|
||||
#else
|
||||
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
|
||||
#endif
|
||||
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
|
||||
struct failed {};
|
||||
|
||||
// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept
|
||||
// 'assert<false>' by reference; can't apply it unconditionally -- apparently it
|
||||
// degrades the quality of GCC diagnostics
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
|
||||
# define AUX778076_ASSERT_ARG(x) x&
|
||||
#else
|
||||
# define AUX778076_ASSERT_ARG(x) x
|
||||
#endif
|
||||
|
||||
template< bool C > struct assert { typedef void* type; };
|
||||
template<> struct assert<false> { typedef AUX778076_ASSERT_ARG(assert) type; };
|
||||
|
||||
template< bool C >
|
||||
int assertion_failed( typename assert<C>::type );
|
||||
|
||||
template< bool C >
|
||||
struct assertion
|
||||
{
|
||||
static int failed( assert<false> );
|
||||
};
|
||||
|
||||
template<>
|
||||
struct assertion<true>
|
||||
{
|
||||
static int failed( void* );
|
||||
};
|
||||
|
||||
struct assert_
|
||||
{
|
||||
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {};
|
||||
#endif
|
||||
static assert_ const arg;
|
||||
enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal };
|
||||
};
|
||||
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
|
||||
|
||||
bool operator==( failed, failed );
|
||||
bool operator!=( failed, failed );
|
||||
bool operator>( failed, failed );
|
||||
bool operator>=( failed, failed );
|
||||
bool operator<( failed, failed );
|
||||
bool operator<=( failed, failed );
|
||||
|
||||
#if defined(__EDG_VERSION__)
|
||||
template< bool (*)(failed, failed), long x, long y > struct assert_relation {};
|
||||
# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<r,x,y>
|
||||
#else
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) >
|
||||
struct assert_relation {};
|
||||
# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<x,y,r>
|
||||
#endif
|
||||
|
||||
#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
|
||||
|
||||
boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ );
|
||||
boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ );
|
||||
boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ );
|
||||
boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ );
|
||||
boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ );
|
||||
boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ );
|
||||
|
||||
template< assert_::relations r, long x, long y > struct assert_relation {};
|
||||
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
|
||||
|
||||
template<class Pred>
|
||||
struct extract_assert_pred;
|
||||
|
||||
template<class Pred>
|
||||
struct extract_assert_pred<void(Pred)> { typedef Pred type; };
|
||||
|
||||
template<class Pred>
|
||||
struct eval_assert {
|
||||
typedef typename extract_assert_pred<Pred>::type P;
|
||||
typedef typename P::type p_type;
|
||||
typedef typename ::boost::mpl::if_c<p_type::value,
|
||||
AUX778076_ASSERT_ARG(assert<false>),
|
||||
failed ************ P::************
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class Pred>
|
||||
struct eval_assert_not {
|
||||
typedef typename extract_assert_pred<Pred>::type P;
|
||||
typedef typename P::type p_type;
|
||||
typedef typename ::boost::mpl::if_c<!p_type::value,
|
||||
AUX778076_ASSERT_ARG(assert<false>),
|
||||
failed ************ ::boost::mpl::not_<P>::************
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
T make_assert_arg();
|
||||
|
||||
#elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
|
||||
|
||||
template< bool > struct assert_arg_pred_impl { typedef int type; };
|
||||
template<> struct assert_arg_pred_impl<true> { typedef void* type; };
|
||||
|
||||
template< typename P > struct assert_arg_pred
|
||||
{
|
||||
typedef typename P::type p_type;
|
||||
typedef typename assert_arg_pred_impl< p_type::value >::type type;
|
||||
};
|
||||
|
||||
template< typename P > struct assert_arg_pred_not
|
||||
{
|
||||
typedef typename P::type p_type;
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value );
|
||||
typedef typename assert_arg_pred_impl<p>::type type;
|
||||
};
|
||||
|
||||
template< typename Pred >
|
||||
failed ************ (Pred::************
|
||||
assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
|
||||
);
|
||||
|
||||
template< typename Pred >
|
||||
failed ************ (boost::mpl::not_<Pred>::************
|
||||
assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
|
||||
);
|
||||
|
||||
template< typename Pred >
|
||||
AUX778076_ASSERT_ARG(assert<false>)
|
||||
assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );
|
||||
|
||||
template< typename Pred >
|
||||
AUX778076_ASSERT_ARG(assert<false>)
|
||||
assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
|
||||
|
||||
|
||||
#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
|
||||
|
||||
template< bool c, typename Pred > struct assert_arg_type_impl
|
||||
{
|
||||
typedef failed ************ Pred::* mwcw83_wknd;
|
||||
typedef mwcw83_wknd ************* type;
|
||||
};
|
||||
|
||||
template< typename Pred > struct assert_arg_type_impl<true,Pred>
|
||||
{
|
||||
typedef AUX778076_ASSERT_ARG(assert<false>) type;
|
||||
};
|
||||
|
||||
template< typename Pred > struct assert_arg_type
|
||||
: assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred >
|
||||
{
|
||||
};
|
||||
|
||||
template< typename Pred >
|
||||
typename assert_arg_type<Pred>::type
|
||||
assert_arg(void (*)(Pred), int);
|
||||
|
||||
template< typename Pred >
|
||||
typename assert_arg_type< boost::mpl::not_<Pred> >::type
|
||||
assert_not_arg(void (*)(Pred), int);
|
||||
|
||||
# if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
|
||||
template< long x, long y, bool (*r)(failed, failed) >
|
||||
typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type
|
||||
assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) );
|
||||
# else
|
||||
template< assert_::relations r, long x, long y >
|
||||
typename assert_arg_type_impl< false,assert_relation<r,x,y> >::type
|
||||
assert_rel_arg( assert_relation<r,x,y> );
|
||||
# endif
|
||||
|
||||
#endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
|
||||
|
||||
#undef AUX778076_ASSERT_ARG
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
|
||||
|
||||
// BOOST_MPL_ASSERT((pred<x,...>))
|
||||
|
||||
#define BOOST_MPL_ASSERT(pred) \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||
boost::mpl::assertion_failed<false>( \
|
||||
boost::mpl::make_assert_arg< \
|
||||
typename boost::mpl::eval_assert<void pred>::type \
|
||||
>() \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
// BOOST_MPL_ASSERT_NOT((pred<x,...>))
|
||||
|
||||
#define BOOST_MPL_ASSERT_NOT(pred) \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||
boost::mpl::assertion_failed<false>( \
|
||||
boost::mpl::make_assert_arg< \
|
||||
typename boost::mpl::eval_assert_not<void pred>::type \
|
||||
>() \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
// BOOST_MPL_ASSERT((pred<x,...>))
|
||||
|
||||
#define BOOST_MPL_ASSERT(pred) \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||
boost::mpl::assertion_failed<false>( \
|
||||
boost::mpl::assert_arg( (void (*) pred)0, 1 ) \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
// BOOST_MPL_ASSERT_NOT((pred<x,...>))
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
# define BOOST_MPL_ASSERT_NOT(pred) \
|
||||
enum { \
|
||||
BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||
boost::mpl::assertion<false>::failed( \
|
||||
boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
|
||||
) \
|
||||
) \
|
||||
}\
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_ASSERT_NOT(pred) \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||
boost::mpl::assertion_failed<false>( \
|
||||
boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y)
|
||||
|
||||
#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
|
||||
|
||||
# if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
|
||||
// agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518
|
||||
# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
|
||||
enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
|
||||
boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
|
||||
(boost::mpl::failed ************ ( boost::mpl::assert_relation< \
|
||||
boost::mpl::assert_::relations( sizeof( \
|
||||
boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
|
||||
) ) \
|
||||
, x \
|
||||
, y \
|
||||
>::************)) 0 ) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \
|
||||
boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
|
||||
) \
|
||||
); \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
|
||||
boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
|
||||
boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \
|
||||
boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \
|
||||
, x \
|
||||
, y \
|
||||
>() ) \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
# endif
|
||||
|
||||
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
|
||||
BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \
|
||||
/**/
|
||||
|
||||
#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
|
||||
|
||||
# if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
|
||||
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||
boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \
|
||||
boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \
|
||||
) ) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||
boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \
|
||||
boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )
|
||||
|
||||
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
|
||||
# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
|
||||
struct msg; \
|
||||
typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
|
||||
{ \
|
||||
using boost::mpl::assert_::types; \
|
||||
static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
|
||||
{ return 0; } \
|
||||
} BOOST_PP_CAT(mpl_assert_arg,counter); \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
|
||||
boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
|
||||
struct msg; \
|
||||
typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
|
||||
{ \
|
||||
static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
|
||||
{ return 0; } \
|
||||
} BOOST_PP_CAT(mpl_assert_arg,counter); \
|
||||
BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
||||
std::size_t \
|
||||
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
|
||||
boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
#define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
|
||||
BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \
|
||||
/**/
|
||||
|
||||
#endif // BOOST_MPL_ASSERT_HPP_INCLUDED
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
#ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_AT_FWD_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Tag > struct at_impl;
|
||||
template< typename Sequence, typename N > struct at;
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AT_FWD_HPP_INCLUDED
|
||||
@@ -0,0 +1,87 @@
|
||||
|
||||
#ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/O1_size_fwd.hpp>
|
||||
#include <boost/mpl/long.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/aux_/has_size.hpp>
|
||||
#include <boost/mpl/aux_/config/forwarding.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// default implementation - returns 'Sequence::size' if sequence has a 'size'
|
||||
// member, and -1 otherwise; conrete sequences might override it by
|
||||
// specializing either the 'O1_size_impl' or the primary 'O1_size' template
|
||||
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
|
||||
&& !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
|
||||
|
||||
namespace aux {
|
||||
template< typename Sequence > struct O1_size_impl
|
||||
: Sequence::size
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
template< typename Tag >
|
||||
struct O1_size_impl
|
||||
{
|
||||
template< typename Sequence > struct apply
|
||||
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
|
||||
: if_<
|
||||
aux::has_size<Sequence>
|
||||
, aux::O1_size_impl<Sequence>
|
||||
, long_<-1>
|
||||
>::type
|
||||
{
|
||||
#else
|
||||
{
|
||||
typedef typename if_<
|
||||
aux::has_size<Sequence>
|
||||
, aux::O1_size_impl<Sequence>
|
||||
, long_<-1>
|
||||
>::type type;
|
||||
|
||||
BOOST_STATIC_CONSTANT(long, value =
|
||||
(if_<
|
||||
aux::has_size<Sequence>
|
||||
, aux::O1_size_impl<Sequence>
|
||||
, long_<-1>
|
||||
>::type::value)
|
||||
);
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
# else // BOOST_MSVC
|
||||
|
||||
template< typename Tag >
|
||||
struct O1_size_impl
|
||||
{
|
||||
template< typename Sequence > struct apply
|
||||
: long_<-1>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
# endif
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/adl.hpp>
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE)
|
||||
|
||||
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_
|
||||
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ {
|
||||
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }
|
||||
# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \
|
||||
namespace boost { namespace mpl { \
|
||||
using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \
|
||||
} } \
|
||||
/**/
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE { namespace aux {} }
|
||||
namespace boost { namespace mpl { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE;
|
||||
namespace aux { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux; }
|
||||
}}
|
||||
#endif
|
||||
|
||||
#else // BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE
|
||||
|
||||
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE boost::mpl
|
||||
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace boost { namespace mpl {
|
||||
# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }}
|
||||
# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/lambda.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \
|
||||
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
|
||||
|
||||
# define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) typedef T name;
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) /**/
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ARITY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/dtp.hpp>
|
||||
|
||||
#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
# include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
// agurt, 15/mar/02: it's possible to implement the template so that it will
|
||||
// "just work" and do not require any specialization, but not on the compilers
|
||||
// that require the arity workaround in the first place
|
||||
template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) >
|
||||
struct arity
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = N);
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES
|
||||
|
||||
#endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED
|
||||
@@ -0,0 +1,67 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/limits/arity.hpp>
|
||||
#include <boost/mpl/aux_/config/dtp.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
#include <boost/mpl/aux_/arity.hpp>
|
||||
#include <boost/mpl/aux_/template_arity_fwd.hpp>
|
||||
#include <boost/mpl/aux_/config/ttp.hpp>
|
||||
#include <boost/mpl/aux_/config/lambda.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
|
||||
#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \
|
||||
namespace aux { \
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \
|
||||
struct arity< \
|
||||
name< BOOST_MPL_PP_PARAMS(i,T) > \
|
||||
, N \
|
||||
> \
|
||||
{ \
|
||||
BOOST_STATIC_CONSTANT(int \
|
||||
, value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
|
||||
); \
|
||||
}; \
|
||||
} \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/
|
||||
#endif
|
||||
|
||||
# define BOOST_MPL_AUX_ARITY_SPEC(i,name) \
|
||||
BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \
|
||||
/**/
|
||||
|
||||
|
||||
#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \
|
||||
&& !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
|
||||
# define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) \
|
||||
namespace aux { \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
||||
struct template_arity< name<BOOST_MPL_PP_PARAMS(i,T)> > \
|
||||
: int_<i> \
|
||||
{ \
|
||||
}; \
|
||||
} \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/
|
||||
#endif
|
||||
|
||||
|
||||
#endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED
|
||||
@@ -0,0 +1,101 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/begin_end_fwd.hpp>
|
||||
#include <boost/mpl/sequence_tag_fwd.hpp>
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/aux_/has_begin.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
|
||||
namespace aux {
|
||||
|
||||
template< typename Sequence >
|
||||
struct begin_type
|
||||
{
|
||||
typedef typename Sequence::begin type;
|
||||
};
|
||||
template< typename Sequence >
|
||||
struct end_type
|
||||
{
|
||||
typedef typename Sequence::end type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// default implementation; conrete sequences might override it by
|
||||
// specializing either the 'begin_impl/end_impl' or the primary
|
||||
// 'begin/end' templates
|
||||
|
||||
template< typename Tag >
|
||||
struct begin_impl
|
||||
{
|
||||
template< typename Sequence > struct apply
|
||||
{
|
||||
typedef typename eval_if<aux::has_begin<Sequence, true_>,
|
||||
aux::begin_type<Sequence>, void_>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag >
|
||||
struct end_impl
|
||||
{
|
||||
template< typename Sequence > struct apply
|
||||
{
|
||||
typedef typename eval_if<aux::has_begin<Sequence, true_>,
|
||||
aux::end_type<Sequence>, void_>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
// specialize 'begin_trait/end_trait' for two pre-defined tags
|
||||
|
||||
# define AUX778076_IMPL_SPEC(name, tag, result) \
|
||||
template<> \
|
||||
struct name##_impl<tag> \
|
||||
{ \
|
||||
template< typename Sequence > struct apply \
|
||||
{ \
|
||||
typedef result type; \
|
||||
}; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
// a sequence with nested 'begin/end' typedefs; just query them
|
||||
AUX778076_IMPL_SPEC(begin, nested_begin_end_tag, typename Sequence::begin)
|
||||
AUX778076_IMPL_SPEC(end, nested_begin_end_tag, typename Sequence::end)
|
||||
|
||||
// if a type 'T' does not contain 'begin/end' or 'tag' members
|
||||
// and doesn't specialize either 'begin/end' or 'begin_impl/end_impl'
|
||||
// templates, then we end up here
|
||||
AUX778076_IMPL_SPEC(begin, non_sequence_tag, void_)
|
||||
AUX778076_IMPL_SPEC(end, non_sequence_tag, void_)
|
||||
AUX778076_IMPL_SPEC(begin, na, void_)
|
||||
AUX778076_IMPL_SPEC(end, na, void_)
|
||||
|
||||
# undef AUX778076_IMPL_SPEC
|
||||
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,begin_impl)
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,end_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/clear_fwd.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// no default implementation; the definition is needed to make MSVC happy
|
||||
|
||||
template< typename Tag >
|
||||
struct clear_impl
|
||||
{
|
||||
template< typename Sequence > struct apply;
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, clear_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, < 0x561)
|
||||
// agurt, 12/nov/02: to suppress the bogus "Cannot have both a template class
|
||||
// and function named 'xxx'" diagnostic
|
||||
# define BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
|
||||
namespace name_##wknd { \
|
||||
template< typename > void name(); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_MPL_AUX_COMMON_NAME_WKND(name) /**/
|
||||
|
||||
#endif // __BORLANDC__
|
||||
|
||||
#endif // BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/intel.hpp>
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
// agurt, 25/apr/04: technically, the ADL workaround is only needed for GCC,
|
||||
// but putting everything expect public, user-specializable metafunctions into
|
||||
// a separate global namespace has a nice side effect of reducing the length
|
||||
// of template instantiation symbols, so we apply the workaround on all
|
||||
// platforms that can handle it
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) \
|
||||
&& ( BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \
|
||||
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \
|
||||
|| BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2003-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2008
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date: 2004-09-02 10:41:37 -0500 (Thu, 02 Sep 2004) $
|
||||
// $Revision: 24874 $
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(__BORLANDC__, >= 0x590) \
|
||||
&& BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||
|
||||
# define BOOST_MPL_CFG_BCC590_WORKAROUNDS
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED
|
||||
|
||||
// Copyright David Abrahams 2002
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_BIND_TEMPLATE
|
||||
|
||||
#endif
|
||||
|
||||
//#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2008
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_COMPILER_DIR)
|
||||
|
||||
# include <boost/mpl/aux_/config/dtp.hpp>
|
||||
# include <boost/mpl/aux_/config/ttp.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/gcc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR msvc60
|
||||
|
||||
# elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR msvc70
|
||||
|
||||
# elif BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304))
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR gcc
|
||||
|
||||
# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||
# if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR bcc551
|
||||
# elif BOOST_WORKAROUND(__BORLANDC__, >= 0x590)
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR bcc
|
||||
# else
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR bcc_pre590
|
||||
# endif
|
||||
|
||||
# elif BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR dmc
|
||||
|
||||
# elif defined(__MWERKS__)
|
||||
# if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR mwcw
|
||||
# else
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR plain
|
||||
# endif
|
||||
|
||||
# elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR no_ctps
|
||||
|
||||
# elif defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS)
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR no_ttp
|
||||
|
||||
# else
|
||||
# define BOOST_MPL_CFG_COMPILER_DIR plain
|
||||
# endif
|
||||
|
||||
#endif // BOOST_MPL_CFG_COMPILER_DIR
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(__BORLANDC__, < 0x582)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC
|
||||
|
||||
#endif
|
||||
|
||||
// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in <boost/config.hpp>
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
|
||||
|
||||
# define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
// MWCW 7.x-8.0 "losts" default template parameters of nested class
|
||||
// templates when their owner classes are passed as arguments to other
|
||||
// templates; Borland 5.5.1 "forgets" them from the very beginning (if
|
||||
// the owner class is a class template), and Borland 5.6 isn't even
|
||||
// able to compile a definition of nested class template with DTP
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(__BORLANDC__, >= 0x560) \
|
||||
&& BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||
|
||||
# define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(__MWERKS__, <= 0x3001) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED
|
||||
@@ -0,0 +1,47 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
// flags for MSVC 6.5's so-called "early template instantiation bug"
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
|
||||
# define BOOST_MPL_CFG_MSVC_60_ETI_BUG
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||
|
||||
# define BOOST_MPL_CFG_MSVC_70_ETI_BUG
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \
|
||||
|| defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_MSVC_ETI_BUG
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||
|
||||
# define BOOST_MPL_CFG_NO_NESTED_FORWARDING
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if defined(__GNUC__) && !defined(__EDG_VERSION__)
|
||||
# define BOOST_MPL_CFG_GCC ((__GNUC__ << 8) | __GNUC_MINOR__)
|
||||
#else
|
||||
# define BOOST_MPL_CFG_GCC 0
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED
|
||||
|
||||
// Copyright Eric Niebler 2014
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_GPU_ENABLED) \
|
||||
|
||||
# define BOOST_MPL_CFG_GPU_ENABLED BOOST_GPU_ENABLED
|
||||
|
||||
#endif
|
||||
|
||||
#if defined __CUDACC__
|
||||
|
||||
# define BOOST_MPL_CFG_GPU 1
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_MPL_CFG_GPU 0
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/has_xxx.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) \
|
||||
&& ( defined(BOOST_MPL_CFG_NO_HAS_XXX) \
|
||||
|| BOOST_WORKAROUND(__EDG_VERSION__, < 300) \
|
||||
|| BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_HAS_APPLY
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
// Copyright David Abrahams 2002-2003
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/overload_resolution.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
// agurt, 11/jan/03: signals a stub-only 'has_xxx' implementation
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) \
|
||||
&& ( defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \
|
||||
|| BOOST_WORKAROUND(__GNUC__, <= 2) \
|
||||
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_HAS_XXX
|
||||
# define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||
|
||||
# define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
|
||||
// BOOST_INTEL_CXX_VERSION is defined here:
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/ttp.hpp>
|
||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||
|
||||
// agurt, 15/jan/02: full-fledged implementation requires both
|
||||
// template template parameters _and_ partial specialization
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \
|
||||
&& ( defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
|
||||
|| defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
|
||||
// BOOST_MSVC is defined here:
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
# define BOOST_MSVC_TYPENAME
|
||||
#else
|
||||
# define BOOST_MSVC_TYPENAME typename
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
// MSVC 6.5 ICE-s on the code as simple as this (see "aux_/nttp_decl.hpp"
|
||||
// for a workaround):
|
||||
//
|
||||
// namespace std {
|
||||
// template< typename Char > struct string;
|
||||
// }
|
||||
//
|
||||
// void foo(std::string<char>);
|
||||
//
|
||||
// namespace boost { namespace mpl {
|
||||
// template< int > struct arg;
|
||||
// }}
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NTTP_BUG) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
|
||||
# define BOOST_MPL_CFG_NTTP_BUG
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2003-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) \
|
||||
&& ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \
|
||||
|| BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \
|
||||
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \
|
||||
|| BOOST_WORKAROUND(__NVCC__, BOOST_TESTED_AT(1)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(__BORLANDC__, < 0x590) \
|
||||
|| BOOST_WORKAROUND(__MWERKS__, < 0x3001) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_AUX_PP_COUNTER)
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, >= 1300)
|
||||
# define BOOST_MPL_AUX_PP_COUNTER() __COUNTER__
|
||||
# else
|
||||
# define BOOST_MPL_AUX_PP_COUNTER() __LINE__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) \
|
||||
&& ( BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, < 0x582) \
|
||||
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES)
|
||||
# define BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) \
|
||||
&& BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
|
||||
# define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING
|
||||
#endif
|
||||
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
// BOOST_STATIC_CONSTANT is defined here:
|
||||
# include <boost/config.hpp>
|
||||
#else
|
||||
// undef the macro for the preprocessing mode
|
||||
# undef BOOST_STATIC_CONSTANT
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
|
||||
&& ( defined(BOOST_NO_TEMPLATE_TEMPLATES) \
|
||||
|| BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590) ) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
// #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
|
||||
@@ -0,0 +1,105 @@
|
||||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/preprocessor/expr_if.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#if !defined(AUX778076_COUNT_ARGS_PARAM_NAME)
|
||||
# define AUX778076_COUNT_ARGS_PARAM_NAME T
|
||||
#endif
|
||||
|
||||
#if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM)
|
||||
# define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME
|
||||
#endif
|
||||
|
||||
// local macros, #undef-ined at the end of the header
|
||||
|
||||
#if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES)
|
||||
|
||||
# include <boost/mpl/aux_/preprocessor/repeat.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
|
||||
# define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT
|
||||
# define AUX778076_COUNT_ARGS_PARAMS(param) \
|
||||
BOOST_MPL_PP_PARAMS( \
|
||||
AUX778076_COUNT_ARGS_ARITY \
|
||||
, param \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/enum_shifted_params.hpp>
|
||||
# include <boost/preprocessor/repeat.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
|
||||
# define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT
|
||||
# define AUX778076_COUNT_ARGS_PARAMS(param) \
|
||||
BOOST_PP_ENUM_SHIFTED_PARAMS( \
|
||||
BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \
|
||||
, param \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
|
||||
|
||||
|
||||
#define AUX778076_IS_ARG_TEMPLATE_NAME \
|
||||
BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \
|
||||
/**/
|
||||
|
||||
#define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \
|
||||
BOOST_PP_EXPR_IF(i, +) \
|
||||
AUX778076_IS_ARG_TEMPLATE_NAME<BOOST_PP_CAT(param,BOOST_PP_INC(i))>::value \
|
||||
/**/
|
||||
|
||||
// is_<xxx>_arg
|
||||
template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM >
|
||||
struct AUX778076_IS_ARG_TEMPLATE_NAME
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct AUX778076_IS_ARG_TEMPLATE_NAME<AUX778076_COUNT_ARGS_DEFAULT>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
// <xxx>_count_args
|
||||
template<
|
||||
AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM)
|
||||
>
|
||||
struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT(
|
||||
AUX778076_COUNT_ARGS_ARITY
|
||||
, AUX778076_COUNT_ARGS_FUNC
|
||||
, AUX778076_COUNT_ARGS_PARAM_NAME
|
||||
));
|
||||
};
|
||||
|
||||
#undef AUX778076_COUNT_ARGS_FUNC
|
||||
#undef AUX778076_IS_ARG_TEMPLATE_NAME
|
||||
#undef AUX778076_COUNT_ARGS_PARAMS
|
||||
#undef AUX778076_COUNT_ARGS_REPEAT
|
||||
|
||||
#undef AUX778076_COUNT_ARGS_ARITY
|
||||
#undef AUX778076_COUNT_ARGS_DEFAULT
|
||||
#undef AUX778076_COUNT_ARGS_PREFIX
|
||||
#undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
|
||||
#undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM
|
||||
#undef AUX778076_COUNT_ARGS_PARAM_NAME
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
// Copyright Eric Friedman 2002
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
#include <boost/mpl/aux_/iter_apply.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< typename Predicate >
|
||||
struct find_if_pred
|
||||
{
|
||||
template< typename Iterator >
|
||||
struct apply
|
||||
{
|
||||
typedef not_< aux::iter_apply1<Predicate,Iterator> > type;
|
||||
};
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
|
||||
@@ -0,0 +1,43 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/next_prior.hpp>
|
||||
# include <boost/mpl/apply.hpp>
|
||||
# include <boost/mpl/deref.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# define AUX778076_FOLD_IMPL_OP(iter) typename deref<iter>::type
|
||||
# define AUX778076_FOLD_IMPL_NAME_PREFIX fold
|
||||
# include <boost/mpl/aux_/fold_impl_body.hpp>
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,365 @@
|
||||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
# include <boost/mpl/limits/unrolling.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/repeat.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/dec.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
// local macros, #undef-ined at the end of the header
|
||||
|
||||
# define AUX778076_ITER_FOLD_STEP(unused, i, unused2) \
|
||||
typedef typename apply2< \
|
||||
ForwardOp \
|
||||
, BOOST_PP_CAT(state,i) \
|
||||
, AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \
|
||||
>::type BOOST_PP_CAT(state,BOOST_PP_INC(i)); \
|
||||
typedef typename mpl::next<BOOST_PP_CAT(iter,i)>::type \
|
||||
BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \
|
||||
/**/
|
||||
|
||||
# define AUX778076_FOLD_IMPL_NAME \
|
||||
BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_FOLD_CHUNK_NAME \
|
||||
BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \
|
||||
/**/
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
/// forward declaration
|
||||
template<
|
||||
BOOST_MPL_AUX_NTTP_DECL(int, N)
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME;
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/fold_impl_body.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
|
||||
template<
|
||||
BOOST_MPL_AUX_NTTP_DECL(int, N)
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME
|
||||
{
|
||||
typedef AUX778076_FOLD_IMPL_NAME<
|
||||
BOOST_MPL_LIMIT_UNROLLING
|
||||
, First
|
||||
, Last
|
||||
, State
|
||||
, ForwardOp
|
||||
> chunk_;
|
||||
|
||||
typedef AUX778076_FOLD_IMPL_NAME<
|
||||
( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
|
||||
, typename chunk_::iterator
|
||||
, Last
|
||||
, typename chunk_::state
|
||||
, ForwardOp
|
||||
> res_;
|
||||
|
||||
typedef typename res_::state state;
|
||||
typedef typename res_::iterator iterator;
|
||||
};
|
||||
|
||||
// fallback implementation for sequences of unknown size
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,ForwardOp>
|
||||
: AUX778076_FOLD_IMPL_NAME<
|
||||
-1
|
||||
, typename mpl::next<First>::type
|
||||
, Last
|
||||
, typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
|
||||
, ForwardOp
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp>
|
||||
{
|
||||
typedef State state;
|
||||
typedef Last iterator;
|
||||
};
|
||||
|
||||
# else // BOOST_WORKAROUND(__BORLANDC__, < 0x600)
|
||||
|
||||
// Borland have some serious problems with the unrolled version, so
|
||||
// we always use a basic implementation
|
||||
template<
|
||||
BOOST_MPL_AUX_NTTP_DECL(int, N)
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME
|
||||
{
|
||||
typedef AUX778076_FOLD_IMPL_NAME<
|
||||
-1
|
||||
, typename mpl::next<First>::type
|
||||
, Last
|
||||
, typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
|
||||
, ForwardOp
|
||||
> res_;
|
||||
|
||||
typedef typename res_::state state;
|
||||
typedef typename res_::iterator iterator;
|
||||
typedef state type;
|
||||
};
|
||||
|
||||
template<
|
||||
BOOST_MPL_AUX_NTTP_DECL(int, N)
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME<N,Last,Last,State,ForwardOp >
|
||||
{
|
||||
typedef State state;
|
||||
typedef Last iterator;
|
||||
typedef state type;
|
||||
};
|
||||
|
||||
# endif // BOOST_WORKAROUND(__BORLANDC__, < 0x600)
|
||||
|
||||
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
|
||||
struct AUX778076_FOLD_CHUNK_NAME;
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/fold_impl_body.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
|
||||
struct AUX778076_FOLD_CHUNK_NAME
|
||||
{
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef AUX778076_FOLD_IMPL_NAME<
|
||||
BOOST_MPL_LIMIT_UNROLLING
|
||||
, First
|
||||
, Last
|
||||
, State
|
||||
, ForwardOp
|
||||
> chunk_;
|
||||
|
||||
typedef AUX778076_FOLD_IMPL_NAME<
|
||||
( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
|
||||
, typename chunk_::iterator
|
||||
, Last
|
||||
, typename chunk_::state
|
||||
, ForwardOp
|
||||
> res_;
|
||||
|
||||
typedef typename res_::state state;
|
||||
typedef typename res_::iterator iterator;
|
||||
};
|
||||
};
|
||||
|
||||
// fallback implementation for sequences of unknown size
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step);
|
||||
|
||||
template<
|
||||
typename Last
|
||||
, typename State
|
||||
>
|
||||
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)
|
||||
{
|
||||
typedef Last iterator;
|
||||
typedef State state;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct AUX778076_FOLD_CHUNK_NAME<-1>
|
||||
{
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename if_<
|
||||
typename is_same<First,Last>::type
|
||||
, BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State>
|
||||
, BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,ForwardOp>
|
||||
>::type res_;
|
||||
|
||||
typedef typename res_::state state;
|
||||
typedef typename res_::iterator iterator;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct result_<int,int,int,int>
|
||||
{
|
||||
typedef int state;
|
||||
typedef int iterator;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)
|
||||
{
|
||||
// can't inherit here - it breaks MSVC 7.0
|
||||
typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_<
|
||||
typename mpl::next<First>::type
|
||||
, Last
|
||||
, typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
|
||||
, ForwardOp
|
||||
> chunk_;
|
||||
|
||||
typedef typename chunk_::state state;
|
||||
typedef typename chunk_::iterator iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
BOOST_MPL_AUX_NTTP_DECL(int, N)
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME
|
||||
: AUX778076_FOLD_CHUNK_NAME<N>
|
||||
::template result_<First,Last,State,ForwardOp>
|
||||
{
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
}}}
|
||||
|
||||
# undef AUX778076_FOLD_IMPL_NAME
|
||||
# undef AUX778076_FOLD_CHUNK_NAME
|
||||
# undef AUX778076_ITER_FOLD_STEP
|
||||
|
||||
#undef AUX778076_FOLD_IMPL_OP
|
||||
#undef AUX778076_FOLD_IMPL_NAME_PREFIX
|
||||
|
||||
///// iteration
|
||||
|
||||
#else
|
||||
|
||||
# define n_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME<n_,First,Last,State,ForwardOp>
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
|
||||
BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused)
|
||||
|
||||
typedef BOOST_PP_CAT(state,n_) state;
|
||||
typedef BOOST_PP_CAT(iter,n_) iterator;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template<> struct AUX778076_FOLD_CHUNK_NAME<n_>
|
||||
{
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
|
||||
BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused)
|
||||
|
||||
typedef BOOST_PP_CAT(state,n_) state;
|
||||
typedef BOOST_PP_CAT(iter,n_) iterator;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct result_<int,int,int,int>
|
||||
{
|
||||
typedef int state;
|
||||
typedef int iterator;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
# undef n_
|
||||
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
@@ -0,0 +1,354 @@
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/lambda_fwd.hpp>
|
||||
# include <boost/mpl/bind_fwd.hpp>
|
||||
# include <boost/mpl/protect.hpp>
|
||||
# include <boost/mpl/quote.hpp>
|
||||
# include <boost/mpl/arg.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/int_fwd.hpp>
|
||||
# include <boost/mpl/aux_/template_arity.hpp>
|
||||
# include <boost/mpl/aux_/na_spec.hpp>
|
||||
# include <boost/mpl/aux_/config/ttp.hpp>
|
||||
# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||
# include <boost/mpl/if.hpp>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/lambda_arity_param.hpp>
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/arity.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/repeat.hpp>
|
||||
# include <boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp>
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/comma_if.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// local macros, #undef-ined at the end of the header
|
||||
# define AUX778076_LAMBDA_PARAMS(i_, param) \
|
||||
BOOST_MPL_PP_PARAMS(i_, param) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_BIND_PARAMS(param) \
|
||||
BOOST_MPL_PP_PARAMS( \
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
|
||||
, param \
|
||||
) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_BIND_N_PARAMS(i_, param) \
|
||||
BOOST_PP_COMMA_IF(i_) \
|
||||
BOOST_MPL_PP_PARAMS(i_, param) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_ARITY_PARAM(param) \
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) \
|
||||
/**/
|
||||
|
||||
|
||||
#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false)
|
||||
>
|
||||
struct lambda_or
|
||||
: true_
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) >
|
||||
: false_
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
#undef n_
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
AUX778076_ARITY_PARAM(typename Arity)
|
||||
>
|
||||
struct lambda
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef T result_;
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
>
|
||||
struct is_lambda_expression
|
||||
: lambda<T>::is_le
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
template< int N, typename Tag >
|
||||
struct lambda< arg<N>,Tag AUX778076_ARITY_PARAM(int_<-1>) >
|
||||
{
|
||||
typedef true_ is_le;
|
||||
typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
|
||||
typedef mpl::protect<result_> type;
|
||||
};
|
||||
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/aux_/full_lambda.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
/// special case for 'protect'
|
||||
template< typename T, typename Tag >
|
||||
struct lambda< mpl::protect<T>,Tag AUX778076_ARITY_PARAM(int_<1>) >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef mpl::protect<T> result_;
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
/// specializations for the main 'bind' form
|
||||
template<
|
||||
typename F, AUX778076_BIND_PARAMS(typename T)
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
bind<F,AUX778076_BIND_PARAMS(T)>
|
||||
, Tag
|
||||
AUX778076_ARITY_PARAM(int_<BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY)>)
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind<F, AUX778076_BIND_PARAMS(T)> result_;
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
|
||||
#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag1
|
||||
, typename Tag2
|
||||
, typename Arity
|
||||
>
|
||||
struct lambda<
|
||||
lambda<F,Tag1,Arity>
|
||||
, Tag2
|
||||
, int_<3>
|
||||
>
|
||||
{
|
||||
typedef lambda< F,Tag2 > l1;
|
||||
typedef lambda< Tag1,Tag2 > l2;
|
||||
|
||||
typedef typename l1::is_le is_le;
|
||||
typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_;
|
||||
typedef lambda< typename if_<is_le,arity_,Arity>::type,Tag2 > l3;
|
||||
|
||||
typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_;
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
#elif !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS)
|
||||
|
||||
/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars
|
||||
template<
|
||||
typename F, typename Tag1, typename Tag2
|
||||
>
|
||||
struct lambda<
|
||||
lambda< F,Tag1 >
|
||||
, Tag2
|
||||
>
|
||||
{
|
||||
typedef lambda< F,Tag2 > l1;
|
||||
typedef lambda< Tag1,Tag2 > l2;
|
||||
|
||||
typedef typename l1::is_le is_le;
|
||||
typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_;
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
# undef AUX778076_ARITY_PARAM
|
||||
# undef AUX778076_BIND_N_PARAMS
|
||||
# undef AUX778076_BIND_PARAMS
|
||||
# undef AUX778076_LAMBDA_PARAMS
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||
BOOST_MPL_AUX_NA_SPEC(2, lambda)
|
||||
#else
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda)
|
||||
#endif
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
|
||||
|
||||
///// iteration, depth == 1
|
||||
|
||||
// For gcc 4.4 compatability, we must include the
|
||||
// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
|
||||
#else // BOOST_PP_IS_ITERATING
|
||||
#if BOOST_PP_ITERATION_DEPTH() == 1
|
||||
#define i_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
#if i_ > 0
|
||||
|
||||
namespace aux {
|
||||
|
||||
# define AUX778076_RESULT(unused, i_, T) \
|
||||
BOOST_PP_COMMA_IF(i_) \
|
||||
typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::result_ \
|
||||
/**/
|
||||
|
||||
# define AUX778076_TYPE(unused, i_, T) \
|
||||
BOOST_PP_COMMA_IF(i_) \
|
||||
typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::type \
|
||||
/**/
|
||||
|
||||
template<
|
||||
typename IsLE, typename Tag
|
||||
, template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F
|
||||
, AUX778076_LAMBDA_PARAMS(i_, typename L)
|
||||
>
|
||||
struct BOOST_PP_CAT(le_result,i_)
|
||||
{
|
||||
typedef F<
|
||||
BOOST_MPL_PP_REPEAT(i_, AUX778076_TYPE, L)
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Tag
|
||||
, template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F
|
||||
, AUX778076_LAMBDA_PARAMS(i_, typename L)
|
||||
>
|
||||
struct BOOST_PP_CAT(le_result,i_)< true_,Tag,F,AUX778076_LAMBDA_PARAMS(i_, L) >
|
||||
{
|
||||
typedef BOOST_PP_CAT(bind,i_)<
|
||||
BOOST_PP_CAT(quote,i_)<F,Tag>
|
||||
, BOOST_MPL_PP_REPEAT(i_, AUX778076_RESULT, L)
|
||||
> result_;
|
||||
|
||||
typedef mpl::protect<result_> type;
|
||||
};
|
||||
|
||||
# undef AUX778076_TYPE
|
||||
# undef AUX778076_RESULT
|
||||
|
||||
} // namespace aux
|
||||
|
||||
|
||||
# define AUX778076_LAMBDA_TYPEDEF(unused, i_, T) \
|
||||
typedef lambda< BOOST_PP_CAT(T, BOOST_PP_INC(i_)), Tag > \
|
||||
BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \
|
||||
/**/
|
||||
|
||||
# define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \
|
||||
typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \
|
||||
BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \
|
||||
/**/
|
||||
|
||||
# define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \
|
||||
BOOST_PP_COMMA_IF(i_) \
|
||||
BOOST_PP_CAT(is_le,BOOST_PP_INC(i_))::value \
|
||||
/**/
|
||||
|
||||
template<
|
||||
template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F
|
||||
, AUX778076_LAMBDA_PARAMS(i_, typename T)
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
F<AUX778076_LAMBDA_PARAMS(i_, T)>
|
||||
, Tag
|
||||
AUX778076_ARITY_PARAM(int_<i_>)
|
||||
>
|
||||
{
|
||||
BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, T)
|
||||
BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused)
|
||||
|
||||
typedef typename aux::lambda_or<
|
||||
BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused)
|
||||
>::type is_le;
|
||||
|
||||
typedef aux::BOOST_PP_CAT(le_result,i_)<
|
||||
is_le, Tag, F, AUX778076_LAMBDA_PARAMS(i_, l)
|
||||
> le_result_;
|
||||
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
|
||||
# undef AUX778076_IS_LAMBDA_EXPR
|
||||
# undef AUX778076_IS_LE_TYPEDEF
|
||||
# undef AUX778076_LAMBDA_TYPEDEF
|
||||
|
||||
#endif // i_ > 0
|
||||
|
||||
template<
|
||||
typename F AUX778076_BIND_N_PARAMS(i_, typename T)
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_, T)>
|
||||
, Tag
|
||||
AUX778076_ARITY_PARAM(int_<BOOST_PP_INC(i_)>)
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef BOOST_PP_CAT(bind,i_)<
|
||||
F
|
||||
AUX778076_BIND_N_PARAMS(i_, T)
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
#undef i_
|
||||
#endif // BOOST_PP_ITERATION_DEPTH()
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/mpl/aux_/config/has_apply.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY)
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false)
|
||||
#else
|
||||
template< typename T, typename fallback_ = false_ >
|
||||
struct has_apply
|
||||
: fallback_
|
||||
{
|
||||
};
|
||||
#endif
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_begin, begin, true)
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
// Copyright David Abrahams 2003
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/has_key_fwd.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// no default implementation; the definition is needed to make MSVC happy
|
||||
|
||||
template< typename Tag > struct has_key_impl
|
||||
{
|
||||
template< typename AssociativeSequence, typename Key > struct apply;
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,has_key_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/intel.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
|
||||
# include <boost/mpl/has_xxx.hpp>
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
# include <boost/mpl/has_xxx.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/aux_/msvc_is_class.hpp>
|
||||
#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/aux_/yes_no.hpp>
|
||||
# include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
# include <boost/type_traits/is_class.hpp>
|
||||
#else
|
||||
# include <boost/mpl/aux_/type_wrapper.hpp>
|
||||
# include <boost/mpl/aux_/yes_no.hpp>
|
||||
# include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
|
||||
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
|
||||
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false)
|
||||
|
||||
template< typename T >
|
||||
struct has_rebind
|
||||
: if_<
|
||||
msvc_is_class<T>
|
||||
, has_rebind_impl<T>
|
||||
, bool_<false>
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
#else // the rest
|
||||
|
||||
template< typename T > struct has_rebind_tag {};
|
||||
no_tag operator|(has_rebind_tag<int>, void const volatile*);
|
||||
|
||||
# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||
template< typename T >
|
||||
struct has_rebind
|
||||
{
|
||||
static has_rebind_tag<T>* get();
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
|
||||
);
|
||||
};
|
||||
# else // __BORLANDC__
|
||||
template< typename T >
|
||||
struct has_rebind_impl
|
||||
{
|
||||
static T* get();
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
|
||||
);
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct has_rebind
|
||||
: if_<
|
||||
is_class<T>
|
||||
, has_rebind_impl<T>
|
||||
, bool_<false>
|
||||
>::type
|
||||
{
|
||||
};
|
||||
# endif // __BORLANDC__
|
||||
|
||||
#endif
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(size)
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false)
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true)
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/compiler.hpp>
|
||||
#include <boost/mpl/aux_/config/preprocessor.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/stringize.hpp>
|
||||
|
||||
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||
# define AUX778076_PREPROCESSED_HEADER \
|
||||
BOOST_MPL_CFG_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \
|
||||
/**/
|
||||
#else
|
||||
# define AUX778076_PREPROCESSED_HEADER \
|
||||
BOOST_PP_CAT(BOOST_MPL_CFG_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700))
|
||||
# define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER)
|
||||
# include AUX778076_INCLUDE_STRING
|
||||
# undef AUX778076_INCLUDE_STRING
|
||||
#else
|
||||
# include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER)
|
||||
#endif
|
||||
|
||||
# undef AUX778076_PREPROCESSED_HEADER
|
||||
|
||||
#undef BOOST_MPL_PREPROCESSED_HEADER
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
#ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/reverse_fold.hpp>
|
||||
#include <boost/mpl/iterator_range.hpp>
|
||||
#include <boost/mpl/clear.hpp>
|
||||
#include <boost/mpl/push_front.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// default implementation; conrete sequences might override it by
|
||||
// specializing either the 'insert_impl' or the primary 'insert' template
|
||||
|
||||
template< typename Tag >
|
||||
struct insert_impl
|
||||
{
|
||||
template<
|
||||
typename Sequence
|
||||
, typename Pos
|
||||
, typename T
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef iterator_range<
|
||||
typename begin<Sequence>::type
|
||||
, Pos
|
||||
> first_half_;
|
||||
|
||||
typedef iterator_range<
|
||||
Pos
|
||||
, typename end<Sequence>::type
|
||||
> second_half_;
|
||||
|
||||
typedef typename reverse_fold<
|
||||
second_half_
|
||||
, typename clear<Sequence>::type
|
||||
, push_front<_,_>
|
||||
>::type half_sequence_;
|
||||
|
||||
typedef typename reverse_fold<
|
||||
first_half_
|
||||
, typename push_front<half_sequence_,T>::type
|
||||
, push_front<_,_>
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,93 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
|
||||
|
||||
#include <boost/mpl/integral_c_tag.hpp>
|
||||
#include <boost/mpl/aux_/static_cast.hpp>
|
||||
#include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#if !defined(AUX_WRAPPER_NAME)
|
||||
# define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_)
|
||||
#endif
|
||||
|
||||
#if !defined(AUX_WRAPPER_PARAMS)
|
||||
# define AUX_WRAPPER_PARAMS(N) BOOST_MPL_AUX_NTTP_DECL(AUX_WRAPPER_VALUE_TYPE, N)
|
||||
#endif
|
||||
|
||||
#if !defined(AUX_WRAPPER_INST)
|
||||
# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
|
||||
# define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value >
|
||||
# else
|
||||
# define AUX_WRAPPER_INST(value) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::AUX_WRAPPER_NAME< value >
|
||||
# endif
|
||||
#endif
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
|
||||
template< AUX_WRAPPER_PARAMS(N) >
|
||||
struct AUX_WRAPPER_NAME
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N);
|
||||
// agurt, 08/mar/03: SGI MIPSpro C++ workaround, have to #ifdef because some
|
||||
// other compilers (e.g. MSVC) are not particulary happy about it
|
||||
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
typedef struct AUX_WRAPPER_NAME type;
|
||||
#else
|
||||
typedef AUX_WRAPPER_NAME type;
|
||||
#endif
|
||||
typedef AUX_WRAPPER_VALUE_TYPE value_type;
|
||||
typedef integral_c_tag tag;
|
||||
|
||||
// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
|
||||
// while some other don't like 'value + 1' (Borland), and some don't like
|
||||
// either
|
||||
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
|
||||
private:
|
||||
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
|
||||
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));
|
||||
public:
|
||||
typedef AUX_WRAPPER_INST(next_value) next;
|
||||
typedef AUX_WRAPPER_INST(prior_value) prior;
|
||||
#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
|
||||
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \
|
||||
|| (BOOST_WORKAROUND(__HP_aCC, <= 53800) && (BOOST_WORKAROUND(__hpxstd98, != 1)))
|
||||
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next;
|
||||
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior;
|
||||
#else
|
||||
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next;
|
||||
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
|
||||
#endif
|
||||
|
||||
// enables uniform function call syntax for families of overloaded
|
||||
// functions that return objects of both arithmetic ('int', 'long',
|
||||
// 'double', etc.) and wrapped integral types (for an example, see
|
||||
// "mpl/example/power.cpp")
|
||||
BOOST_CONSTEXPR operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast<AUX_WRAPPER_VALUE_TYPE>(this->value); }
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
|
||||
template< AUX_WRAPPER_PARAMS(N) >
|
||||
AUX_WRAPPER_VALUE_TYPE const AUX_WRAPPER_INST(N)::value;
|
||||
#endif
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
|
||||
#undef AUX_WRAPPER_NAME
|
||||
#undef AUX_WRAPPER_PARAMS
|
||||
#undef AUX_WRAPPER_INST
|
||||
#undef AUX_WRAPPER_VALUE_TYPE
|
||||
@@ -0,0 +1,64 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/yes_no.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
|
||||
template< typename T >
|
||||
struct is_msvc_eti_arg
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
#else // BOOST_MPL_CFG_MSVC_60_ETI_BUG
|
||||
|
||||
struct eti_int_convertible
|
||||
{
|
||||
eti_int_convertible(int);
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct is_msvc_eti_arg
|
||||
{
|
||||
static no_tag test(...);
|
||||
static yes_tag test(eti_int_convertible);
|
||||
static T& get();
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
sizeof(test(get())) == sizeof(yes_tag)
|
||||
);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template<>
|
||||
struct is_msvc_eti_arg<int>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
#endif // BOOST_MPL_CFG_MSVC_ETI_BUG
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED
|
||||
@@ -0,0 +1,47 @@
|
||||
|
||||
#ifndef BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
||||
#define BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Iterator
|
||||
>
|
||||
struct iter_apply1
|
||||
: apply1< F,typename deref<Iterator>::type >
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Iterator1
|
||||
, typename Iterator2
|
||||
>
|
||||
struct iter_apply2
|
||||
: apply2<
|
||||
F
|
||||
, typename deref<Iterator1>::type
|
||||
, typename deref<Iterator2>::type
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
||||
@@ -0,0 +1,210 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
// Copyright David Abrahams 2001-2002
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/identity.hpp>
|
||||
# include <boost/mpl/next.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/apply.hpp>
|
||||
# include <boost/mpl/aux_/value_wknd.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_if_impl.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/unrolling.hpp>
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
# include <boost/preprocessor/repeat.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/dec.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< typename Iterator, typename State >
|
||||
struct iter_fold_if_null_step
|
||||
{
|
||||
typedef State state;
|
||||
typedef Iterator iterator;
|
||||
};
|
||||
|
||||
template< bool >
|
||||
struct iter_fold_if_step_impl
|
||||
{
|
||||
template<
|
||||
typename Iterator
|
||||
, typename State
|
||||
, typename StateOp
|
||||
, typename IteratorOp
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename apply2<StateOp,State,Iterator>::type state;
|
||||
typedef typename IteratorOp::type iterator;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct iter_fold_if_step_impl<false>
|
||||
{
|
||||
template<
|
||||
typename Iterator
|
||||
, typename State
|
||||
, typename StateOp
|
||||
, typename IteratorOp
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef State state;
|
||||
typedef Iterator iterator;
|
||||
};
|
||||
};
|
||||
|
||||
// agurt, 25/jun/02: MSVC 6.5 workaround, had to get rid of inheritance
|
||||
// here and in 'iter_fold_if_backward_step', because sometimes it interfered
|
||||
// with the "early template instantiation bug" in _really_ ugly ways
|
||||
template<
|
||||
typename Iterator
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
, typename Predicate
|
||||
>
|
||||
struct iter_fold_if_forward_step
|
||||
{
|
||||
typedef typename apply2<Predicate,State,Iterator>::type not_last;
|
||||
typedef typename iter_fold_if_step_impl<
|
||||
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
|
||||
>::template result_< Iterator,State,ForwardOp,mpl::next<Iterator> > impl_;
|
||||
|
||||
typedef typename impl_::state state;
|
||||
typedef typename impl_::iterator iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Iterator
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename Predicate
|
||||
>
|
||||
struct iter_fold_if_backward_step
|
||||
{
|
||||
typedef typename apply2<Predicate,State,Iterator>::type not_last;
|
||||
typedef typename iter_fold_if_step_impl<
|
||||
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
|
||||
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
|
||||
|
||||
typedef typename impl_::state state;
|
||||
typedef typename impl_::iterator iterator;
|
||||
};
|
||||
|
||||
|
||||
// local macros, #undef-ined at the end of the header
|
||||
|
||||
# define AUX_ITER_FOLD_FORWARD_STEP(unused, i, unused2) \
|
||||
typedef iter_fold_if_forward_step< \
|
||||
typename BOOST_PP_CAT(forward_step,i)::iterator \
|
||||
, typename BOOST_PP_CAT(forward_step,i)::state \
|
||||
, ForwardOp \
|
||||
, ForwardPredicate \
|
||||
> BOOST_PP_CAT(forward_step, BOOST_PP_INC(i)); \
|
||||
/**/
|
||||
|
||||
# define AUX_ITER_FOLD_BACKWARD_STEP_FUNC(i) \
|
||||
typedef iter_fold_if_backward_step< \
|
||||
typename BOOST_PP_CAT(forward_step,BOOST_PP_DEC(i))::iterator \
|
||||
, typename BOOST_PP_CAT(backward_step,i)::state \
|
||||
, BackwardOp \
|
||||
, BackwardPredicate \
|
||||
> BOOST_PP_CAT(backward_step,BOOST_PP_DEC(i)); \
|
||||
/**/
|
||||
|
||||
# define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, unused2) \
|
||||
AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \
|
||||
BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_UNROLLING,i) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
# define AUX_LAST_FORWARD_STEP \
|
||||
BOOST_PP_CAT(forward_step, BOOST_MPL_LIMIT_UNROLLING) \
|
||||
/**/
|
||||
|
||||
# define AUX_LAST_BACKWARD_STEP \
|
||||
BOOST_PP_CAT(backward_step, BOOST_MPL_LIMIT_UNROLLING) \
|
||||
/**/
|
||||
|
||||
template<
|
||||
typename Iterator
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
, typename ForwardPredicate
|
||||
, typename BackwardOp
|
||||
, typename BackwardPredicate
|
||||
>
|
||||
struct iter_fold_if_impl
|
||||
{
|
||||
private:
|
||||
typedef iter_fold_if_null_step<Iterator,State> forward_step0;
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_MPL_LIMIT_UNROLLING
|
||||
, AUX_ITER_FOLD_FORWARD_STEP
|
||||
, unused
|
||||
)
|
||||
|
||||
typedef typename if_<
|
||||
typename AUX_LAST_FORWARD_STEP::not_last
|
||||
, iter_fold_if_impl<
|
||||
typename AUX_LAST_FORWARD_STEP::iterator
|
||||
, typename AUX_LAST_FORWARD_STEP::state
|
||||
, ForwardOp
|
||||
, ForwardPredicate
|
||||
, BackwardOp
|
||||
, BackwardPredicate
|
||||
>
|
||||
, iter_fold_if_null_step<
|
||||
typename AUX_LAST_FORWARD_STEP::iterator
|
||||
, typename AUX_LAST_FORWARD_STEP::state
|
||||
>
|
||||
>::type AUX_LAST_BACKWARD_STEP;
|
||||
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_MPL_LIMIT_UNROLLING
|
||||
, AUX_ITER_FOLD_BACKWARD_STEP
|
||||
, unused
|
||||
)
|
||||
|
||||
public:
|
||||
typedef typename backward_step0::state state;
|
||||
typedef typename AUX_LAST_BACKWARD_STEP::iterator iterator;
|
||||
};
|
||||
|
||||
# undef AUX_LAST_BACKWARD_STEP
|
||||
# undef AUX_LAST_FORWARD_STEP
|
||||
# undef AUX_ITER_FOLD_BACKWARD_STEP
|
||||
# undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC
|
||||
# undef AUX_ITER_FOLD_FORWARD_STEP
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/ttp.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||
# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param)
|
||||
#else
|
||||
# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) , param
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
|
||||
@@ -0,0 +1,193 @@
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/lambda_fwd.hpp>
|
||||
# include <boost/mpl/bind_fwd.hpp>
|
||||
# include <boost/mpl/protect.hpp>
|
||||
# include <boost/mpl/is_placeholder.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/identity.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/aux_/na_spec.hpp>
|
||||
# include <boost/mpl/aux_/lambda_support.hpp>
|
||||
# include <boost/mpl/aux_/template_arity.hpp>
|
||||
# include <boost/mpl/aux_/value_wknd.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/arity.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/repeat.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
# include <boost/preprocessor/comma_if.hpp>
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define AUX778076_LAMBDA_PARAMS(i_, param) \
|
||||
BOOST_MPL_PP_PARAMS(i_, param) \
|
||||
/**/
|
||||
|
||||
namespace aux {
|
||||
|
||||
#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
template<
|
||||
BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false)
|
||||
>
|
||||
struct lambda_or
|
||||
: true_
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) >
|
||||
: false_
|
||||
{
|
||||
};
|
||||
#undef n_
|
||||
|
||||
template< typename Arity > struct lambda_impl
|
||||
{
|
||||
template< typename T, typename Tag, typename Protect > struct result_
|
||||
{
|
||||
typedef T type;
|
||||
typedef is_placeholder<T> is_le;
|
||||
};
|
||||
};
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/aux_/lambda_no_ctps.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Protect
|
||||
>
|
||||
struct lambda
|
||||
{
|
||||
/// Metafunction forwarding confuses MSVC 6.x
|
||||
typedef typename aux::template_arity<T>::type arity_;
|
||||
typedef typename aux::lambda_impl<arity_>
|
||||
::template result_< T,Tag,Protect > l_;
|
||||
|
||||
typedef typename l_::type type;
|
||||
typedef typename l_::is_le is_le;
|
||||
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
|
||||
|
||||
template<
|
||||
typename T
|
||||
>
|
||||
struct is_lambda_expression
|
||||
: lambda<T>::is_le
|
||||
{
|
||||
};
|
||||
|
||||
# undef AUX778076_LAMBDA_PARAMS
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
|
||||
|
||||
///// iteration, depth == 1
|
||||
|
||||
#else
|
||||
|
||||
#define i_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
# define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \
|
||||
typedef lambda< \
|
||||
typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \
|
||||
, Tag \
|
||||
, false_ \
|
||||
> BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \
|
||||
/**/
|
||||
|
||||
# define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \
|
||||
typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \
|
||||
BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \
|
||||
/**/
|
||||
|
||||
# define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \
|
||||
BOOST_PP_COMMA_IF(i_) \
|
||||
BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \
|
||||
/**/
|
||||
|
||||
# define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \
|
||||
, typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \
|
||||
/**/
|
||||
|
||||
template<> struct lambda_impl< int_<i_> >
|
||||
{
|
||||
template< typename F, typename Tag, typename Protect > struct result_
|
||||
{
|
||||
BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F)
|
||||
BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused)
|
||||
|
||||
typedef aux::lambda_or<
|
||||
BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused)
|
||||
> is_le;
|
||||
|
||||
typedef BOOST_PP_CAT(bind,i_)<
|
||||
typename F::rebind
|
||||
BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused)
|
||||
> bind_;
|
||||
|
||||
typedef typename if_<
|
||||
is_le
|
||||
, if_< Protect, mpl::protect<bind_>, bind_ >
|
||||
, identity<F>
|
||||
>::type type_;
|
||||
|
||||
typedef typename type_::type type;
|
||||
};
|
||||
};
|
||||
|
||||
# undef AUX778076_LAMBDA_RESULT
|
||||
# undef AUX778076_IS_LAMBDA_EXPR
|
||||
# undef AUX778076_IS_LE_TYPEDEF
|
||||
# undef AUX778076_LAMBDA_TYPEDEF
|
||||
|
||||
#undef i_
|
||||
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2007
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/lambda_fwd.hpp>
|
||||
#include <boost/mpl/int_fwd.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
#include <boost/mpl/aux_/lambda_arity_param.hpp>
|
||||
#include <boost/mpl/aux_/config/lambda.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
|
||||
|
||||
# define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \
|
||||
template< \
|
||||
BOOST_MPL_PP_PARAMS(i, typename T) \
|
||||
, typename Tag \
|
||||
> \
|
||||
struct lambda< \
|
||||
name< BOOST_MPL_PP_PARAMS(i, T) > \
|
||||
, Tag \
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<i>) \
|
||||
> \
|
||||
{ \
|
||||
typedef false_ is_le; \
|
||||
typedef name< BOOST_MPL_PP_PARAMS(i, T) > result_; \
|
||||
typedef result_ type; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) /**/
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
||||
@@ -0,0 +1,169 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/lambda.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/int_fwd.hpp>
|
||||
# include <boost/mpl/aux_/yes_no.hpp>
|
||||
# include <boost/mpl/aux_/na_fwd.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
# include <boost/preprocessor/tuple/to_list.hpp>
|
||||
# include <boost/preprocessor/list/for_each_i.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \
|
||||
typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \
|
||||
/**/
|
||||
|
||||
// agurt, 07/mar/03: restore an old revision for the sake of SGI MIPSpro C++
|
||||
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
|
||||
typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
|
||||
BOOST_PP_LIST_FOR_EACH_I_R( \
|
||||
1 \
|
||||
, BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
|
||||
, typedef \
|
||||
, BOOST_PP_TUPLE_TO_LIST(i,params) \
|
||||
) \
|
||||
struct rebind \
|
||||
{ \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
|
||||
: name< BOOST_MPL_PP_PARAMS(i,U) > \
|
||||
{ \
|
||||
}; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
|
||||
/**/
|
||||
|
||||
#elif BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
|
||||
// agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9
|
||||
// (in strict mode), so we have to provide an alternative to the
|
||||
// MSVC-optimized implementation
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
|
||||
BOOST_PP_LIST_FOR_EACH_I_R( \
|
||||
1 \
|
||||
, BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
|
||||
, typedef \
|
||||
, BOOST_PP_TUPLE_TO_LIST(i,params) \
|
||||
) \
|
||||
struct rebind; \
|
||||
/**/
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
}; \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
||||
struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \
|
||||
{ \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
|
||||
: name< BOOST_MPL_PP_PARAMS(i,U) > \
|
||||
{ \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#else // __EDG_VERSION__
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
template< typename T > struct has_rebind_tag;
|
||||
}}}
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
|
||||
BOOST_PP_LIST_FOR_EACH_I_R( \
|
||||
1 \
|
||||
, BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
|
||||
, typedef \
|
||||
, BOOST_PP_TUPLE_TO_LIST(i,params) \
|
||||
) \
|
||||
friend class BOOST_PP_CAT(name,_rebind); \
|
||||
typedef BOOST_PP_CAT(name,_rebind) rebind; \
|
||||
/**/
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
||||
::boost::mpl::aux::yes_tag operator|( \
|
||||
::boost::mpl::aux::has_rebind_tag<int> \
|
||||
, name<BOOST_MPL_PP_PARAMS(i,T)>* \
|
||||
); \
|
||||
::boost::mpl::aux::no_tag operator|( \
|
||||
::boost::mpl::aux::has_rebind_tag<int> \
|
||||
, name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \
|
||||
); \
|
||||
/**/
|
||||
#elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
||||
::boost::mpl::aux::yes_tag operator|( \
|
||||
::boost::mpl::aux::has_rebind_tag<int> \
|
||||
, ::boost::mpl::aux::has_rebind_tag< name<BOOST_MPL_PP_PARAMS(i,T)> >* \
|
||||
); \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/
|
||||
#endif
|
||||
|
||||
# if !defined(__BORLANDC__)
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
}; \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||
class BOOST_PP_CAT(name,_rebind) \
|
||||
{ \
|
||||
public: \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
|
||||
: name< BOOST_MPL_PP_PARAMS(i,U) > \
|
||||
{ \
|
||||
}; \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
}; \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||
class BOOST_PP_CAT(name,_rebind) \
|
||||
{ \
|
||||
public: \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
|
||||
{ \
|
||||
typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \
|
||||
}; \
|
||||
/**/
|
||||
# endif // __BORLANDC__
|
||||
|
||||
#endif // __EDG_VERSION__
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
|
||||
|
||||
#endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||
@@ -0,0 +1,165 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/aux_/nested_type_wknd.hpp>
|
||||
# include <boost/mpl/aux_/na_spec.hpp>
|
||||
# include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/limits/arity.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/ext_params.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/sub.hpp>
|
||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define AUX778076_PARAMS(param, sub) \
|
||||
BOOST_MPL_PP_PARAMS( \
|
||||
BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \
|
||||
, param \
|
||||
) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_SHIFTED_PARAMS(param, sub) \
|
||||
BOOST_MPL_PP_EXT_PARAMS( \
|
||||
2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \
|
||||
, param \
|
||||
) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_SPEC_PARAMS(param) \
|
||||
BOOST_MPL_PP_ENUM( \
|
||||
BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \
|
||||
, param \
|
||||
) \
|
||||
/**/
|
||||
|
||||
namespace aux {
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
template< bool C_, AUX778076_PARAMS(typename T, 1) >
|
||||
struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)
|
||||
: BOOST_PP_CAT(AUX778076_OP_VALUE1,_)
|
||||
{
|
||||
};
|
||||
|
||||
template< AUX778076_PARAMS(typename T, 1) >
|
||||
struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) >
|
||||
: BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
|
||||
, AUX778076_SHIFTED_PARAMS(T, 1)
|
||||
, BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
|
||||
AUX778076_OP_VALUE2
|
||||
, AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))
|
||||
>
|
||||
: BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)
|
||||
{
|
||||
template< AUX778076_PARAMS(typename T, 1) > struct result_
|
||||
: BOOST_PP_CAT(AUX778076_OP_VALUE1,_)
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
|
||||
{
|
||||
template< AUX778076_PARAMS(typename T, 1) > struct result_
|
||||
: BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
|
||||
>::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) >
|
||||
{
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||
template<> struct result_<AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))>
|
||||
: BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
|
||||
{
|
||||
};
|
||||
};
|
||||
#else
|
||||
};
|
||||
|
||||
template<>
|
||||
struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
|
||||
::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) >
|
||||
: BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
|
||||
{
|
||||
};
|
||||
#endif // BOOST_MSVC == 1300
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(T1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(T2)
|
||||
BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_))
|
||||
>
|
||||
struct AUX778076_OP_NAME
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
: aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
|
||||
, AUX778076_SHIFTED_PARAMS(T,0)
|
||||
>
|
||||
#else
|
||||
: aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
|
||||
>::template result_< AUX778076_SHIFTED_PARAMS(T,0) >
|
||||
#endif
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
, AUX778076_OP_NAME
|
||||
, (AUX778076_PARAMS(T, 0))
|
||||
)
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(
|
||||
2
|
||||
, BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
, AUX778076_OP_NAME
|
||||
)
|
||||
|
||||
}}
|
||||
|
||||
#undef AUX778076_SPEC_PARAMS
|
||||
#undef AUX778076_SHIFTED_PARAMS
|
||||
#undef AUX778076_PARAMS
|
||||
#undef AUX778076_OP_NAME
|
||||
#undef AUX778076_OP_VALUE1
|
||||
#undef AUX778076_OP_VALUE2
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
|
||||
|
||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
|
||||
// local macros, #undef-ined at the end of the header
|
||||
#define AUX778076_DTW_PARAMS(param) \
|
||||
BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \
|
||||
/**/
|
||||
|
||||
#define AUX778076_DTW_ORIGINAL_NAME \
|
||||
AUX778076_MSVC_DTW_ORIGINAL_NAME \
|
||||
/**/
|
||||
|
||||
// warning: not a well-formed C++
|
||||
// workaround for MSVC 6.5's "dependent template typedef bug"
|
||||
|
||||
template< typename F>
|
||||
struct AUX778076_MSVC_DTW_NAME
|
||||
{
|
||||
template< bool > struct f_ : F {};
|
||||
template<> struct f_<true>
|
||||
{
|
||||
#if AUX778076_MSVC_DTW_ARITY > 0
|
||||
template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
};
|
||||
|
||||
template< AUX778076_DTW_PARAMS(typename T) > struct result_
|
||||
: f_< aux::msvc_never_true<F>::value >
|
||||
::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) >
|
||||
{
|
||||
};
|
||||
#else
|
||||
template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T = int > struct result_
|
||||
: f_< aux::msvc_never_true<F>::value >
|
||||
::template AUX778076_DTW_ORIGINAL_NAME<>
|
||||
{
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef AUX778076_DTW_ORIGINAL_NAME
|
||||
#undef AUX778076_DTW_PARAMS
|
||||
|
||||
#undef AUX778076_MSVC_DTW_NAME
|
||||
#undef AUX778076_MSVC_DTW_ORIGINAL_NAME
|
||||
#undef AUX778076_MSVC_DTW_ARITY
|
||||
@@ -0,0 +1,77 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
|
||||
|
||||
template< bool > struct msvc_eti_base_impl
|
||||
{
|
||||
template< typename T > struct result_
|
||||
: T
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct msvc_eti_base_impl<true>
|
||||
{
|
||||
template< typename T > struct result_
|
||||
{
|
||||
typedef result_ type;
|
||||
typedef result_ first;
|
||||
typedef result_ second;
|
||||
typedef result_ tag;
|
||||
enum { value = 0 };
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct msvc_eti_base
|
||||
: msvc_eti_base_impl< is_msvc_eti_arg<T>::value >
|
||||
::template result_<T>
|
||||
{
|
||||
};
|
||||
|
||||
#else // !BOOST_MPL_CFG_MSVC_70_ETI_BUG
|
||||
|
||||
template< typename T > struct msvc_eti_base
|
||||
: T
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304))
|
||||
msvc_eti_base();
|
||||
#endif
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template<> struct msvc_eti_base<int>
|
||||
{
|
||||
typedef msvc_eti_base type;
|
||||
typedef msvc_eti_base first;
|
||||
typedef msvc_eti_base second;
|
||||
typedef msvc_eti_base tag;
|
||||
enum { value = 0 };
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED
|
||||
@@ -0,0 +1,58 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/type_wrapper.hpp>
|
||||
#include <boost/mpl/aux_/yes_no.hpp>
|
||||
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< typename T > struct is_class_helper
|
||||
{
|
||||
typedef int (T::* type)();
|
||||
};
|
||||
|
||||
// MSVC 6.x-specific lightweight 'is_class' implementation;
|
||||
// Distinguishing feature: does not instantiate the type being tested.
|
||||
template< typename T >
|
||||
struct msvc_is_class_impl
|
||||
{
|
||||
template< typename U>
|
||||
static yes_tag test(type_wrapper<U>*, /*typename*/ is_class_helper<U>::type = 0);
|
||||
static no_tag test(void const volatile*, ...);
|
||||
|
||||
enum { value = sizeof(test((type_wrapper<T>*)0)) == sizeof(yes_tag) };
|
||||
typedef bool_<value> type;
|
||||
};
|
||||
|
||||
// agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in
|
||||
// complex metaprograms
|
||||
template< typename T >
|
||||
struct msvc_is_class
|
||||
: if_<
|
||||
is_reference<T>
|
||||
, false_
|
||||
, msvc_is_class_impl<T>
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< typename T >
|
||||
struct msvc_never_true
|
||||
{
|
||||
enum { value = false };
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MSVC
|
||||
|
||||
#endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
||||
@@ -0,0 +1,62 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
|
||||
|
||||
template< bool > struct msvc_type_impl
|
||||
{
|
||||
template< typename T > struct result_
|
||||
{
|
||||
typedef typename T::type type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct msvc_type_impl<true>
|
||||
{
|
||||
template< typename T > struct result_
|
||||
{
|
||||
typedef result_ type;
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct msvc_type
|
||||
: msvc_type_impl< is_msvc_eti_arg<T>::value >
|
||||
::template result_<T>
|
||||
{
|
||||
};
|
||||
|
||||
#else // BOOST_MPL_CFG_MSVC_70_ETI_BUG
|
||||
|
||||
template< typename T > struct msvc_type
|
||||
{
|
||||
typedef typename T::type type;
|
||||
};
|
||||
|
||||
template<> struct msvc_type<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED
|
||||
@@ -0,0 +1,95 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_NA_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/na_fwd.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename T >
|
||||
struct is_na
|
||||
: false_
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
using false_::value;
|
||||
#endif
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_na<na>
|
||||
: true_
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
using true_::value;
|
||||
#endif
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct is_not_na
|
||||
: true_
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
using true_::value;
|
||||
#endif
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_not_na<na>
|
||||
: false_
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
using false_::value;
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
template< typename T, typename U > struct if_na
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template< typename U > struct if_na<na,U>
|
||||
{
|
||||
typedef U type;
|
||||
};
|
||||
#else
|
||||
template< typename T > struct if_na_impl
|
||||
{
|
||||
template< typename U > struct apply
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct if_na_impl<na>
|
||||
{
|
||||
template< typename U > struct apply
|
||||
{
|
||||
typedef U type;
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T, typename U > struct if_na
|
||||
: if_na_impl<T>::template apply<U>
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_NA_HPP_INCLUDED
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !BOOST_WORKAROUND(_MSC_FULL_VER, <= 140050601) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
|
||||
# include <boost/mpl/assert.hpp>
|
||||
# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \
|
||||
BOOST_MPL_ASSERT_NOT((boost::mpl::is_na<type>)) \
|
||||
/**/
|
||||
#else
|
||||
# include <boost/static_assert.hpp>
|
||||
# define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \
|
||||
BOOST_STATIC_ASSERT(!boost::mpl::is_na<x>::value) \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/adl_barrier.hpp>
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
|
||||
// n.a. == not available
|
||||
struct na
|
||||
{
|
||||
typedef na type;
|
||||
enum { value = 0 };
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
BOOST_MPL_AUX_ADL_BARRIER_DECL(na)
|
||||
|
||||
#endif // BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED
|
||||
@@ -0,0 +1,175 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/lambda_fwd.hpp>
|
||||
# include <boost/mpl/int.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/aux_/na.hpp>
|
||||
# include <boost/mpl/aux_/arity.hpp>
|
||||
# include <boost/mpl/aux_/template_arity_fwd.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
|
||||
#include <boost/mpl/aux_/lambda_arity_param.hpp>
|
||||
#include <boost/mpl/aux_/config/dtp.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
#include <boost/mpl/aux_/config/ttp.hpp>
|
||||
#include <boost/mpl/aux_/config/lambda.hpp>
|
||||
#include <boost/mpl/aux_/config/overload_resolution.hpp>
|
||||
|
||||
|
||||
#define BOOST_MPL_AUX_NA_PARAMS(i) \
|
||||
BOOST_MPL_PP_ENUM(i, na) \
|
||||
/**/
|
||||
|
||||
#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
|
||||
namespace aux { \
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \
|
||||
struct arity< \
|
||||
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
|
||||
, N \
|
||||
> \
|
||||
: int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \
|
||||
{ \
|
||||
}; \
|
||||
} \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/
|
||||
#endif
|
||||
|
||||
#define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
|
||||
template<> \
|
||||
struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \
|
||||
{ \
|
||||
template< \
|
||||
BOOST_MPL_PP_PARAMS(i, typename T) \
|
||||
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
|
||||
> \
|
||||
struct apply \
|
||||
: name< BOOST_MPL_PP_PARAMS(i, T) > \
|
||||
{ \
|
||||
}; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
|
||||
# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
|
||||
template<> \
|
||||
struct lambda< \
|
||||
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
|
||||
, void_ \
|
||||
, true_ \
|
||||
> \
|
||||
{ \
|
||||
typedef false_ is_le; \
|
||||
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
|
||||
}; \
|
||||
template<> \
|
||||
struct lambda< \
|
||||
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
|
||||
, void_ \
|
||||
, false_ \
|
||||
> \
|
||||
{ \
|
||||
typedef false_ is_le; \
|
||||
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
|
||||
}; \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
|
||||
template< typename Tag > \
|
||||
struct lambda< \
|
||||
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
|
||||
, Tag \
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \
|
||||
> \
|
||||
{ \
|
||||
typedef false_ is_le; \
|
||||
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \
|
||||
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
|
||||
}; \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \
|
||||
|| defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \
|
||||
&& defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION)
|
||||
# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \
|
||||
namespace aux { \
|
||||
template< BOOST_MPL_PP_PARAMS(j, typename T) > \
|
||||
struct template_arity< \
|
||||
name< BOOST_MPL_PP_PARAMS(j, T) > \
|
||||
> \
|
||||
: int_<j> \
|
||||
{ \
|
||||
}; \
|
||||
\
|
||||
template<> \
|
||||
struct template_arity< \
|
||||
name< BOOST_MPL_PP_ENUM(i, na) > \
|
||||
> \
|
||||
: int_<-1> \
|
||||
{ \
|
||||
}; \
|
||||
} \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
|
||||
template<> \
|
||||
struct name< BOOST_MPL_PP_ENUM(i, int) > \
|
||||
{ \
|
||||
typedef int type; \
|
||||
enum { value = 0 }; \
|
||||
}; \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/
|
||||
#endif
|
||||
|
||||
#define BOOST_MPL_AUX_NA_PARAM(param) param = na
|
||||
|
||||
#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \
|
||||
/**/
|
||||
|
||||
#define BOOST_MPL_AUX_NA_SPEC(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
|
||||
/**/
|
||||
|
||||
#define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
|
||||
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \
|
||||
/**/
|
||||
|
||||
|
||||
#endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
|
||||
|| BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530)) \
|
||||
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
template< typename T > struct nested_type_wknd
|
||||
: T::type
|
||||
{
|
||||
};
|
||||
}}}
|
||||
|
||||
#if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
|
||||
# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \
|
||||
aux::nested_type_wknd<T> \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \
|
||||
::boost::mpl::aux::nested_type_wknd<T> \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
#else // !BOOST_MPL_CFG_GCC et al.
|
||||
|
||||
# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) T::type
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/nttp.hpp>
|
||||
|
||||
#if defined(BOOST_MPL_CFG_NTTP_BUG)
|
||||
|
||||
typedef bool _mpl_nttp_bool;
|
||||
typedef int _mpl_nttp_int;
|
||||
typedef unsigned _mpl_nttp_unsigned;
|
||||
typedef long _mpl_nttp_long;
|
||||
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(_mpl_nttp_,T) x /**/
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/ptr_to_ref.hpp>
|
||||
#include <boost/mpl/aux_/config/operators.hpp>
|
||||
|
||||
#if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING)
|
||||
|
||||
# include <boost/mpl/aux_/static_cast.hpp>
|
||||
|
||||
# define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY operator/
|
||||
# define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER operator|
|
||||
# define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY operator||
|
||||
# define BOOST_MPL_AUX_OVERLOAD_IS_MASKED operator%
|
||||
|
||||
# define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) / x
|
||||
# define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) | x
|
||||
# define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) || x
|
||||
# define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) % x
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY value_by_key_
|
||||
# define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER item_by_order_
|
||||
# define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY order_by_key_
|
||||
# define BOOST_MPL_AUX_OVERLOAD_IS_MASKED is_masked_
|
||||
|
||||
# define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x) T::BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x )
|
||||
# define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x) T::BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER( BOOST_MPL_AUX_PTR_TO_REF(T), x )
|
||||
# define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x) T::BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x )
|
||||
# define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x) T::BOOST_MPL_AUX_OVERLOAD_IS_MASKED( BOOST_MPL_AUX_PTR_TO_REF(T), x )
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "advance_backward.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< long N > struct advance_backward;
|
||||
template<>
|
||||
struct advance_backward<0>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct advance_backward<1>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef typename prior<iter0>::type iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct advance_backward<2>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef typename prior<iter0>::type iter1;
|
||||
typedef typename prior<iter1>::type iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct advance_backward<3>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef typename prior<iter0>::type iter1;
|
||||
typedef typename prior<iter1>::type iter2;
|
||||
typedef typename prior<iter2>::type iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct advance_backward<4>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef typename prior<iter0>::type iter1;
|
||||
typedef typename prior<iter1>::type iter2;
|
||||
typedef typename prior<iter2>::type iter3;
|
||||
typedef typename prior<iter3>::type iter4;
|
||||
typedef iter4 type;
|
||||
};
|
||||
};
|
||||
|
||||
template< long N >
|
||||
struct advance_backward
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef typename apply_wrap1<
|
||||
advance_backward<4>
|
||||
, Iterator
|
||||
>::type chunk_result_;
|
||||
|
||||
typedef typename apply_wrap1<
|
||||
advance_backward<(
|
||||
(N - 4) < 0
|
||||
? 0
|
||||
: N - 4
|
||||
)>
|
||||
, chunk_result_
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "advance_forward.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< long N > struct advance_forward;
|
||||
template<>
|
||||
struct advance_forward<0>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef iter0 type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct advance_forward<1>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef typename next<iter0>::type iter1;
|
||||
typedef iter1 type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct advance_forward<2>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef typename next<iter0>::type iter1;
|
||||
typedef typename next<iter1>::type iter2;
|
||||
typedef iter2 type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct advance_forward<3>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef typename next<iter0>::type iter1;
|
||||
typedef typename next<iter1>::type iter2;
|
||||
typedef typename next<iter2>::type iter3;
|
||||
typedef iter3 type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct advance_forward<4>
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
typedef typename next<iter0>::type iter1;
|
||||
typedef typename next<iter1>::type iter2;
|
||||
typedef typename next<iter2>::type iter3;
|
||||
typedef typename next<iter3>::type iter4;
|
||||
typedef iter4 type;
|
||||
};
|
||||
};
|
||||
|
||||
template< long N >
|
||||
struct advance_forward
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef typename apply_wrap1<
|
||||
advance_forward<4>
|
||||
, Iterator
|
||||
>::type chunk_result_;
|
||||
|
||||
typedef typename apply_wrap1<
|
||||
advance_forward<(
|
||||
(N - 4) < 0
|
||||
? 0
|
||||
: N - 4
|
||||
)>
|
||||
, chunk_result_
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "and.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
|
||||
template< bool C_, typename T1, typename T2, typename T3, typename T4 >
|
||||
struct and_impl
|
||||
: false_
|
||||
{
|
||||
};
|
||||
|
||||
template< typename T1, typename T2, typename T3, typename T4 >
|
||||
struct and_impl< true,T1,T2,T3,T4 >
|
||||
: and_impl<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
|
||||
, T2, T3, T4
|
||||
, true_
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct and_impl<
|
||||
true
|
||||
, true_, true_, true_, true_
|
||||
>
|
||||
: true_
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(T1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(T2)
|
||||
, typename T3 = true_, typename T4 = true_, typename T5 = true_
|
||||
>
|
||||
struct and_
|
||||
|
||||
: aux::and_impl<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
|
||||
, T2, T3, T4, T5
|
||||
>
|
||||
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, and_
|
||||
, ( T1, T2, T3, T4, T5)
|
||||
)
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(
|
||||
2
|
||||
, 5
|
||||
, and_
|
||||
)
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,169 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "apply.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply0
|
||||
|
||||
: apply_wrap0<
|
||||
typename lambda<F>::type
|
||||
|
||||
>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
1
|
||||
, apply0
|
||||
, (F )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply< F,na,na,na,na,na >
|
||||
: apply0<F>
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply1
|
||||
|
||||
: apply_wrap1<
|
||||
typename lambda<F>::type
|
||||
, T1
|
||||
>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
2
|
||||
, apply1
|
||||
, (F, T1)
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply< F,T1,na,na,na,na >
|
||||
: apply1< F,T1 >
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply2
|
||||
|
||||
: apply_wrap2<
|
||||
typename lambda<F>::type
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
3
|
||||
, apply2
|
||||
, (F, T1, T2)
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply< F,T1,T2,na,na,na >
|
||||
: apply2< F,T1,T2 >
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply3
|
||||
|
||||
: apply_wrap3<
|
||||
typename lambda<F>::type
|
||||
, T1, T2, T3
|
||||
>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
4
|
||||
, apply3
|
||||
, (F, T1, T2, T3)
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply< F,T1,T2,T3,na,na >
|
||||
: apply3< F,T1,T2,T3 >
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply4
|
||||
|
||||
: apply_wrap4<
|
||||
typename lambda<F>::type
|
||||
, T1, T2, T3, T4
|
||||
>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, apply4
|
||||
, (F, T1, T2, T3, T4)
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply< F,T1,T2,T3,T4,na >
|
||||
: apply4< F,T1,T2,T3,T4 >
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply5
|
||||
|
||||
: apply_wrap5<
|
||||
typename lambda<F>::type
|
||||
, T1, T2, T3, T4, T5
|
||||
>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
6
|
||||
, apply5
|
||||
, (F, T1, T2, T3, T4, T5)
|
||||
)
|
||||
};
|
||||
|
||||
/// primary template (not a specialization!)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply
|
||||
: apply5< F,T1,T2,T3,T4,T5 >
|
||||
{
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "apply_fwd.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename F, typename T1 = na, typename T2 = na, typename T3 = na
|
||||
, typename T4 = na, typename T5 = na
|
||||
>
|
||||
struct apply;
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply0;
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply1;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply2;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply3;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply4;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply5;
|
||||
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,461 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2008
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "apply_wrap.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
int N, typename F
|
||||
>
|
||||
struct apply_wrap_impl0;
|
||||
|
||||
template< typename F, bool F_has_apply >
|
||||
struct apply_wrap_impl0_bcb {
|
||||
typedef typename F::template apply<na> type;
|
||||
};
|
||||
|
||||
template< typename F >
|
||||
struct apply_wrap_impl0_bcb< F,true > {
|
||||
typedef typename F::apply type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
0
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef apply_wrap_impl0_bcb< F, aux::has_apply<F>::value >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
1
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
2
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
3
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
4
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
5
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na, na, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap0
|
||||
: apply_wrap_impl0<
|
||||
::boost::mpl::aux::arity< F,0 >::value
|
||||
, F
|
||||
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1;
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
1
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
2
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
3
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
4
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
5
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
, na, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap1
|
||||
: apply_wrap_impl1<
|
||||
::boost::mpl::aux::arity< F,1 >::value
|
||||
, F
|
||||
, T1
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2<
|
||||
2
|
||||
, F
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2<
|
||||
3
|
||||
, F
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2
|
||||
|
||||
, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2<
|
||||
4
|
||||
, F
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2
|
||||
|
||||
, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2<
|
||||
5
|
||||
, F
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2
|
||||
|
||||
, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap2
|
||||
: apply_wrap_impl2<
|
||||
::boost::mpl::aux::arity< F,2 >::value
|
||||
, F
|
||||
, T1, T2
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap_impl3;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap_impl3<
|
||||
3
|
||||
, F
|
||||
, T1, T2, T3
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap_impl3<
|
||||
4
|
||||
, F
|
||||
, T1, T2, T3
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3
|
||||
|
||||
, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap_impl3<
|
||||
5
|
||||
, F
|
||||
, T1, T2, T3
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3
|
||||
|
||||
, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap3
|
||||
: apply_wrap_impl3<
|
||||
::boost::mpl::aux::arity< F,3 >::value
|
||||
, F
|
||||
, T1, T2, T3
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply_wrap_impl4;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply_wrap_impl4<
|
||||
4
|
||||
, F
|
||||
, T1, T2, T3, T4
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3, T4
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply_wrap_impl4<
|
||||
5
|
||||
, F
|
||||
, T1, T2, T3, T4
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3, T4
|
||||
|
||||
, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply_wrap4
|
||||
: apply_wrap_impl4<
|
||||
::boost::mpl::aux::arity< F,4 >::value
|
||||
, F
|
||||
, T1, T2, T3, T4
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply_wrap_impl5;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply_wrap_impl5<
|
||||
5
|
||||
, F
|
||||
, T1, T2, T3, T4, T5
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3, T4, T5
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply_wrap5
|
||||
: apply_wrap_impl5<
|
||||
::boost::mpl::aux::arity< F,5 >::value
|
||||
, F
|
||||
, T1, T2, T3, T4, T5
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
|
||||
// Copyright Peter Dimov 2001-2002
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "arg.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
template<> struct arg< -1 >
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = -1);
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
|
||||
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef U1 type;
|
||||
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct arg<1>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = 1);
|
||||
typedef arg<2> next;
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
|
||||
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef U1 type;
|
||||
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct arg<2>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = 2);
|
||||
typedef arg<3> next;
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
|
||||
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef U2 type;
|
||||
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct arg<3>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = 3);
|
||||
typedef arg<4> next;
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
|
||||
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef U3 type;
|
||||
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct arg<4>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = 4);
|
||||
typedef arg<5> next;
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
|
||||
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef U4 type;
|
||||
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct arg<5>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = 5);
|
||||
typedef arg<6> next;
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
|
||||
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
|
||||
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef U5 type;
|
||||
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
|
||||
};
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg)
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
@@ -0,0 +1,300 @@
|
||||
|
||||
// Copyright Peter Dimov 2001
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "basic_bind.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename T, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
|
||||
{
|
||||
typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct bind0
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||
|
||||
public:
|
||||
typedef typename apply_wrap0<
|
||||
f_
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind0<F>, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind0<F> f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct bind1
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||
typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
|
||||
|
||||
public:
|
||||
typedef typename apply_wrap1<
|
||||
f_
|
||||
, typename t1::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename U1, typename U2, typename U3
|
||||
, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind1< F,T1 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind1< F,T1 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct bind2
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||
typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
|
||||
typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
|
||||
|
||||
public:
|
||||
typedef typename apply_wrap2<
|
||||
f_
|
||||
, typename t1::type, typename t2::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename U1, typename U2
|
||||
, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind2< F,T1,T2 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind2< F,T1,T2 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct bind3
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||
typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
|
||||
typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
|
||||
typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
|
||||
|
||||
public:
|
||||
typedef typename apply_wrap3<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename U1
|
||||
, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind3< F,T1,T2,T3 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct bind4
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||
typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
|
||||
typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
|
||||
typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
|
||||
typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
|
||||
|
||||
public:
|
||||
typedef typename apply_wrap4<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
, typename t4::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind4< F,T1,T2,T3,T4 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct bind5
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||
typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
|
||||
typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
|
||||
typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
|
||||
typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
|
||||
typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
|
||||
|
||||
public:
|
||||
typedef typename apply_wrap5<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
, typename t4::type, typename t5::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind5< F,T1,T2,T3,T4,T5 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,397 @@
|
||||
|
||||
// Copyright Peter Dimov 2001
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "bind.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename T, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Arg
|
||||
>
|
||||
struct replace_unnamed_arg
|
||||
{
|
||||
typedef Arg next;
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Arg
|
||||
>
|
||||
struct replace_unnamed_arg< arg< -1 >, Arg >
|
||||
{
|
||||
typedef typename Arg::next next;
|
||||
typedef Arg type;
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
|
||||
{
|
||||
typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct bind0
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap0<
|
||||
f_
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind0<F>, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind0<F> f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct bind1
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap1<
|
||||
f_
|
||||
, typename t1::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename U1, typename U2, typename U3
|
||||
, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind1< F,T1 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind1< F,T1 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct bind2
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||
typedef typename r2::type a2;
|
||||
typedef typename r2::next n3;
|
||||
typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap2<
|
||||
f_
|
||||
, typename t1::type, typename t2::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename U1, typename U2
|
||||
, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind2< F,T1,T2 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind2< F,T1,T2 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct bind3
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||
typedef typename r2::type a2;
|
||||
typedef typename r2::next n3;
|
||||
typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||
typedef typename r3::type a3;
|
||||
typedef typename r3::next n4;
|
||||
typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap3<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename U1
|
||||
, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind3< F,T1,T2,T3 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct bind4
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||
typedef typename r2::type a2;
|
||||
typedef typename r2::next n3;
|
||||
typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||
typedef typename r3::type a3;
|
||||
typedef typename r3::next n4;
|
||||
typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T4,n4 > r4;
|
||||
typedef typename r4::type a4;
|
||||
typedef typename r4::next n5;
|
||||
typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap4<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
, typename t4::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind4< F,T1,T2,T3,T4 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct bind5
|
||||
{
|
||||
template<
|
||||
typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||
typedef typename r2::type a2;
|
||||
typedef typename r2::next n3;
|
||||
typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||
typedef typename r3::type a3;
|
||||
typedef typename r3::next n4;
|
||||
typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T4,n4 > r4;
|
||||
typedef typename r4::type a4;
|
||||
typedef typename r4::next n5;
|
||||
typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T5,n5 > r5;
|
||||
typedef typename r5::type a5;
|
||||
typedef typename r5::next n6;
|
||||
typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap5<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
, typename t4::type, typename t5::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind5< F,T1,T2,T3,T4,T5 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "bind_fwd.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct bind0;
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct bind1;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct bind2;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct bind3;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct bind4;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct bind5;
|
||||
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
// Copyright Jaap Suter 2003
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "bitand.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct bitand_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct bitand_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct bitand_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct bitand_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct bitand_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
, typename N3 = na, typename N4 = na, typename N5 = na
|
||||
>
|
||||
struct bitand_
|
||||
: bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, bitand_
|
||||
, ( N1, N2, N3, N4, N5 )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3, typename N4
|
||||
>
|
||||
struct bitand_< N1,N2,N3,N4,na >
|
||||
|
||||
: bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitand_
|
||||
, ( N1, N2, N3, N4, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3
|
||||
>
|
||||
struct bitand_< N1,N2,N3,na,na >
|
||||
|
||||
: bitand_< bitand_< N1,N2 >, N3>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitand_
|
||||
, ( N1, N2, N3, na, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2
|
||||
>
|
||||
struct bitand_< N1,N2,na,na,na >
|
||||
: bitand_impl<
|
||||
typename bitand_tag<N1>::type
|
||||
, typename bitand_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitand_
|
||||
, ( N1, N2, na, na, na )
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
template<>
|
||||
struct bitand_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: integral_c<
|
||||
typename aux::largest_int<
|
||||
typename N1::value_type
|
||||
, typename N2::value_type
|
||||
>::type
|
||||
, ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
|
||||
& BOOST_MPL_AUX_VALUE_WKND(N2)::value
|
||||
)
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,147 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
// Copyright Jaap Suter 2003
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "bitor.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct bitor_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct bitor_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct bitor_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct bitor_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct bitor_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
, typename N3 = na, typename N4 = na, typename N5 = na
|
||||
>
|
||||
struct bitor_
|
||||
: bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, bitor_
|
||||
, ( N1, N2, N3, N4, N5 )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3, typename N4
|
||||
>
|
||||
struct bitor_< N1,N2,N3,N4,na >
|
||||
|
||||
: bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitor_
|
||||
, ( N1, N2, N3, N4, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3
|
||||
>
|
||||
struct bitor_< N1,N2,N3,na,na >
|
||||
|
||||
: bitor_< bitor_< N1,N2 >, N3>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitor_
|
||||
, ( N1, N2, N3, na, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2
|
||||
>
|
||||
struct bitor_< N1,N2,na,na,na >
|
||||
: bitor_impl<
|
||||
typename bitor_tag<N1>::type
|
||||
, typename bitor_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitor_
|
||||
, ( N1, N2, na, na, na )
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
template<>
|
||||
struct bitor_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: integral_c<
|
||||
typename aux::largest_int<
|
||||
typename N1::value_type
|
||||
, typename N2::value_type
|
||||
>::type
|
||||
, ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
|
||||
| BOOST_MPL_AUX_VALUE_WKND(N2)::value
|
||||
)
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,147 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
// Copyright Jaap Suter 2003
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "bitxor.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct bitxor_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct bitxor_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct bitxor_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct bitxor_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct bitxor_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
, typename N3 = na, typename N4 = na, typename N5 = na
|
||||
>
|
||||
struct bitxor_
|
||||
: bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, bitxor_
|
||||
, ( N1, N2, N3, N4, N5 )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3, typename N4
|
||||
>
|
||||
struct bitxor_< N1,N2,N3,N4,na >
|
||||
|
||||
: bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitxor_
|
||||
, ( N1, N2, N3, N4, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3
|
||||
>
|
||||
struct bitxor_< N1,N2,N3,na,na >
|
||||
|
||||
: bitxor_< bitxor_< N1,N2 >, N3>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitxor_
|
||||
, ( N1, N2, N3, na, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2
|
||||
>
|
||||
struct bitxor_< N1,N2,na,na,na >
|
||||
: bitxor_impl<
|
||||
typename bitxor_tag<N1>::type
|
||||
, typename bitxor_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitxor_
|
||||
, ( N1, N2, na, na, na )
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
template<>
|
||||
struct bitxor_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: integral_c<
|
||||
typename aux::largest_int<
|
||||
typename N1::value_type
|
||||
, typename N2::value_type
|
||||
>::type
|
||||
, ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
|
||||
^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
|
||||
)
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,323 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "deque.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
|
||||
, typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
|
||||
, typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
|
||||
, typename T12 = na, typename T13 = na, typename T14 = na
|
||||
, typename T15 = na, typename T16 = na, typename T17 = na
|
||||
, typename T18 = na, typename T19 = na
|
||||
>
|
||||
struct deque;
|
||||
|
||||
template<
|
||||
|
||||
>
|
||||
struct deque<
|
||||
na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector0< >
|
||||
{
|
||||
typedef vector0< >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0
|
||||
>
|
||||
struct deque<
|
||||
T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector1<T0>
|
||||
{
|
||||
typedef typename vector1<T0>::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector2< T0,T1 >
|
||||
{
|
||||
typedef typename vector2< T0,T1 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector3< T0,T1,T2 >
|
||||
{
|
||||
typedef typename vector3< T0,T1,T2 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector4< T0,T1,T2,T3 >
|
||||
{
|
||||
typedef typename vector4< T0,T1,T2,T3 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector5< T0,T1,T2,T3,T4 >
|
||||
{
|
||||
typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector6< T0,T1,T2,T3,T4,T5 >
|
||||
{
|
||||
typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector7< T0,T1,T2,T3,T4,T5,T6 >
|
||||
{
|
||||
typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
|
||||
{
|
||||
typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
|
||||
{
|
||||
typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
|
||||
{
|
||||
typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
|
||||
, na, na, na
|
||||
>
|
||||
: vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
|
||||
{
|
||||
typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
|
||||
, na, na, na, na
|
||||
>
|
||||
: vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
|
||||
{
|
||||
typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
|
||||
, na, na, na, na
|
||||
>
|
||||
: vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
|
||||
{
|
||||
typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
|
||||
, na, na, na, na
|
||||
>
|
||||
: vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
|
||||
{
|
||||
typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
|
||||
, na, na, na, na
|
||||
>
|
||||
: vector15<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
>
|
||||
{
|
||||
typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15, na, na, na, na
|
||||
>
|
||||
: vector16<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15
|
||||
>
|
||||
{
|
||||
typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15, T16, na, na, na
|
||||
>
|
||||
: vector17<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15, T16
|
||||
>
|
||||
{
|
||||
typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15, T16, T17, na, na
|
||||
>
|
||||
: vector18<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15, T16, T17
|
||||
>
|
||||
{
|
||||
typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18
|
||||
>
|
||||
struct deque<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15, T16, T17, T18, na
|
||||
>
|
||||
: vector19<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15, T16, T17, T18
|
||||
>
|
||||
{
|
||||
typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
|
||||
};
|
||||
|
||||
/// primary template (not a specialization!)
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
>
|
||||
struct deque
|
||||
: vector20<
|
||||
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
|
||||
, T15, T16, T17, T18, T19
|
||||
>
|
||||
{
|
||||
typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "divides.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct divides_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct divides_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct divides_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct divides_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct divides_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
, typename N3 = na, typename N4 = na, typename N5 = na
|
||||
>
|
||||
struct divides
|
||||
: divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, divides
|
||||
, ( N1, N2, N3, N4, N5 )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3, typename N4
|
||||
>
|
||||
struct divides< N1,N2,N3,N4,na >
|
||||
|
||||
: divides< divides< divides< N1,N2 >, N3>, N4>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, divides
|
||||
, ( N1, N2, N3, N4, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3
|
||||
>
|
||||
struct divides< N1,N2,N3,na,na >
|
||||
|
||||
: divides< divides< N1,N2 >, N3>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, divides
|
||||
, ( N1, N2, N3, na, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2
|
||||
>
|
||||
struct divides< N1,N2,na,na,na >
|
||||
: divides_impl<
|
||||
typename divides_tag<N1>::type
|
||||
, typename divides_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, divides
|
||||
, ( N1, N2, na, na, na )
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
template<>
|
||||
struct divides_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: integral_c<
|
||||
typename aux::largest_int<
|
||||
typename N1::value_type
|
||||
, typename N2::value_type
|
||||
>::type
|
||||
, ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
|
||||
/ BOOST_MPL_AUX_VALUE_WKND(N2)::value
|
||||
)
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "equal_to.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct equal_to_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct equal_to_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct equal_to_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct equal_to_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct equal_to_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct equal_to
|
||||
|
||||
: equal_to_impl<
|
||||
typename equal_to_tag<N1>::type
|
||||
, typename equal_to_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct equal_to_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,180 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "fold_impl.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
/// forward declaration
|
||||
|
||||
template<
|
||||
int N
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl;
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl< 0,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef state0 state;
|
||||
typedef iter0 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl< 1,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
|
||||
typedef typename mpl::next<iter0>::type iter1;
|
||||
|
||||
|
||||
typedef state1 state;
|
||||
typedef iter1 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl< 2,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
|
||||
typedef typename mpl::next<iter0>::type iter1;
|
||||
typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
|
||||
typedef typename mpl::next<iter1>::type iter2;
|
||||
|
||||
|
||||
typedef state2 state;
|
||||
typedef iter2 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl< 3,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
|
||||
typedef typename mpl::next<iter0>::type iter1;
|
||||
typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
|
||||
typedef typename mpl::next<iter1>::type iter2;
|
||||
typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
|
||||
typedef typename mpl::next<iter2>::type iter3;
|
||||
|
||||
|
||||
typedef state3 state;
|
||||
typedef iter3 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl< 4,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
|
||||
typedef typename mpl::next<iter0>::type iter1;
|
||||
typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
|
||||
typedef typename mpl::next<iter1>::type iter2;
|
||||
typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
|
||||
typedef typename mpl::next<iter2>::type iter3;
|
||||
typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
|
||||
typedef typename mpl::next<iter3>::type iter4;
|
||||
|
||||
|
||||
typedef state4 state;
|
||||
typedef iter4 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
int N
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl
|
||||
{
|
||||
typedef fold_impl<
|
||||
4
|
||||
, First
|
||||
, Last
|
||||
, State
|
||||
, ForwardOp
|
||||
> chunk_;
|
||||
|
||||
typedef fold_impl<
|
||||
( (N - 4) < 0 ? 0 : N - 4 )
|
||||
, typename chunk_::iterator
|
||||
, Last
|
||||
, typename chunk_::state
|
||||
, ForwardOp
|
||||
> res_;
|
||||
|
||||
typedef typename res_::state state;
|
||||
typedef typename res_::iterator iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl< -1,First,Last,State,ForwardOp >
|
||||
: fold_impl<
|
||||
-1
|
||||
, typename mpl::next<First>::type
|
||||
, Last
|
||||
, typename apply2<ForwardOp,State, typename deref<First>::type>::type
|
||||
, ForwardOp
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct fold_impl< -1,Last,Last,State,ForwardOp >
|
||||
{
|
||||
typedef State state;
|
||||
typedef Last iterator;
|
||||
};
|
||||
|
||||
}}}
|
||||
@@ -0,0 +1,558 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "full_lambda.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
|
||||
, bool C5 = false
|
||||
>
|
||||
struct lambda_or
|
||||
: true_
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct lambda_or< false,false,false,false,false >
|
||||
: false_
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Tag
|
||||
, typename Arity
|
||||
>
|
||||
struct lambda
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef T result_;
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
>
|
||||
struct is_lambda_expression
|
||||
: lambda<T>::is_le
|
||||
{
|
||||
};
|
||||
|
||||
template< int N, typename Tag >
|
||||
struct lambda< arg<N>,Tag, int_< -1 > >
|
||||
{
|
||||
typedef true_ is_le;
|
||||
typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41
|
||||
typedef mpl::protect<result_> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
bind0<F>
|
||||
, Tag
|
||||
, int_<1>
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind0<
|
||||
F
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Tag
|
||||
, template< typename P1 > class F
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1
|
||||
{
|
||||
typedef F<
|
||||
typename L1::type
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Tag
|
||||
, template< typename P1 > class F
|
||||
, typename L1
|
||||
>
|
||||
struct le_result1< true_,Tag,F,L1 >
|
||||
{
|
||||
typedef bind1<
|
||||
quote1< F,Tag >
|
||||
, typename L1::result_
|
||||
> result_;
|
||||
|
||||
typedef mpl::protect<result_> type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
F<T1>
|
||||
, Tag
|
||||
, int_<1>
|
||||
>
|
||||
{
|
||||
typedef lambda< T1,Tag > l1;
|
||||
typedef typename l1::is_le is_le1;
|
||||
typedef typename aux::lambda_or<
|
||||
is_le1::value
|
||||
>::type is_le;
|
||||
|
||||
typedef aux::le_result1<
|
||||
is_le, Tag, F, l1
|
||||
> le_result_;
|
||||
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
bind1< F,T1 >
|
||||
, Tag
|
||||
, int_<2>
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind1<
|
||||
F
|
||||
, T1
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Tag
|
||||
, template< typename P1, typename P2 > class F
|
||||
, typename L1, typename L2
|
||||
>
|
||||
struct le_result2
|
||||
{
|
||||
typedef F<
|
||||
typename L1::type, typename L2::type
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Tag
|
||||
, template< typename P1, typename P2 > class F
|
||||
, typename L1, typename L2
|
||||
>
|
||||
struct le_result2< true_,Tag,F,L1,L2 >
|
||||
{
|
||||
typedef bind2<
|
||||
quote2< F,Tag >
|
||||
, typename L1::result_, typename L2::result_
|
||||
> result_;
|
||||
|
||||
typedef mpl::protect<result_> type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename T1, typename T2
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
F< T1,T2 >
|
||||
, Tag
|
||||
, int_<2>
|
||||
>
|
||||
{
|
||||
typedef lambda< T1,Tag > l1;
|
||||
typedef lambda< T2,Tag > l2;
|
||||
|
||||
typedef typename l1::is_le is_le1;
|
||||
typedef typename l2::is_le is_le2;
|
||||
|
||||
|
||||
typedef typename aux::lambda_or<
|
||||
is_le1::value, is_le2::value
|
||||
>::type is_le;
|
||||
|
||||
typedef aux::le_result2<
|
||||
is_le, Tag, F, l1, l2
|
||||
> le_result_;
|
||||
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
bind2< F,T1,T2 >
|
||||
, Tag
|
||||
, int_<3>
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind2<
|
||||
F
|
||||
, T1, T2
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Tag
|
||||
, template< typename P1, typename P2, typename P3 > class F
|
||||
, typename L1, typename L2, typename L3
|
||||
>
|
||||
struct le_result3
|
||||
{
|
||||
typedef F<
|
||||
typename L1::type, typename L2::type, typename L3::type
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Tag
|
||||
, template< typename P1, typename P2, typename P3 > class F
|
||||
, typename L1, typename L2, typename L3
|
||||
>
|
||||
struct le_result3< true_,Tag,F,L1,L2,L3 >
|
||||
{
|
||||
typedef bind3<
|
||||
quote3< F,Tag >
|
||||
, typename L1::result_, typename L2::result_, typename L3::result_
|
||||
> result_;
|
||||
|
||||
typedef mpl::protect<result_> type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3 > class F
|
||||
, typename T1, typename T2, typename T3
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
F< T1,T2,T3 >
|
||||
, Tag
|
||||
, int_<3>
|
||||
>
|
||||
{
|
||||
typedef lambda< T1,Tag > l1;
|
||||
typedef lambda< T2,Tag > l2;
|
||||
typedef lambda< T3,Tag > l3;
|
||||
|
||||
typedef typename l1::is_le is_le1;
|
||||
typedef typename l2::is_le is_le2;
|
||||
typedef typename l3::is_le is_le3;
|
||||
|
||||
|
||||
typedef typename aux::lambda_or<
|
||||
is_le1::value, is_le2::value, is_le3::value
|
||||
>::type is_le;
|
||||
|
||||
typedef aux::le_result3<
|
||||
is_le, Tag, F, l1, l2, l3
|
||||
> le_result_;
|
||||
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
bind3< F,T1,T2,T3 >
|
||||
, Tag
|
||||
, int_<4>
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind3<
|
||||
F
|
||||
, T1, T2, T3
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Tag
|
||||
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4
|
||||
>
|
||||
struct le_result4
|
||||
{
|
||||
typedef F<
|
||||
typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Tag
|
||||
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4
|
||||
>
|
||||
struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
|
||||
{
|
||||
typedef bind4<
|
||||
quote4< F,Tag >
|
||||
, typename L1::result_, typename L2::result_, typename L3::result_
|
||||
, typename L4::result_
|
||||
> result_;
|
||||
|
||||
typedef mpl::protect<result_> type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename T1, typename T2, typename T3, typename T4
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
F< T1,T2,T3,T4 >
|
||||
, Tag
|
||||
, int_<4>
|
||||
>
|
||||
{
|
||||
typedef lambda< T1,Tag > l1;
|
||||
typedef lambda< T2,Tag > l2;
|
||||
typedef lambda< T3,Tag > l3;
|
||||
typedef lambda< T4,Tag > l4;
|
||||
|
||||
typedef typename l1::is_le is_le1;
|
||||
typedef typename l2::is_le is_le2;
|
||||
typedef typename l3::is_le is_le3;
|
||||
typedef typename l4::is_le is_le4;
|
||||
|
||||
|
||||
typedef typename aux::lambda_or<
|
||||
is_le1::value, is_le2::value, is_le3::value, is_le4::value
|
||||
>::type is_le;
|
||||
|
||||
typedef aux::le_result4<
|
||||
is_le, Tag, F, l1, l2, l3, l4
|
||||
> le_result_;
|
||||
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
bind4< F,T1,T2,T3,T4 >
|
||||
, Tag
|
||||
, int_<5>
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind4<
|
||||
F
|
||||
, T1, T2, T3, T4
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename IsLE, typename Tag
|
||||
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5
|
||||
{
|
||||
typedef F<
|
||||
typename L1::type, typename L2::type, typename L3::type
|
||||
, typename L4::type, typename L5::type
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Tag
|
||||
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
|
||||
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||
>
|
||||
struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
|
||||
{
|
||||
typedef bind5<
|
||||
quote5< F,Tag >
|
||||
, typename L1::result_, typename L2::result_, typename L3::result_
|
||||
, typename L4::result_, typename L5::result_
|
||||
> result_;
|
||||
|
||||
typedef mpl::protect<result_> type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
template<
|
||||
typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
F< T1,T2,T3,T4,T5 >
|
||||
, Tag
|
||||
, int_<5>
|
||||
>
|
||||
{
|
||||
typedef lambda< T1,Tag > l1;
|
||||
typedef lambda< T2,Tag > l2;
|
||||
typedef lambda< T3,Tag > l3;
|
||||
typedef lambda< T4,Tag > l4;
|
||||
typedef lambda< T5,Tag > l5;
|
||||
|
||||
typedef typename l1::is_le is_le1;
|
||||
typedef typename l2::is_le is_le2;
|
||||
typedef typename l3::is_le is_le3;
|
||||
typedef typename l4::is_le is_le4;
|
||||
typedef typename l5::is_le is_le5;
|
||||
|
||||
|
||||
typedef typename aux::lambda_or<
|
||||
is_le1::value, is_le2::value, is_le3::value, is_le4::value
|
||||
, is_le5::value
|
||||
>::type is_le;
|
||||
|
||||
typedef aux::le_result5<
|
||||
is_le, Tag, F, l1, l2, l3, l4, l5
|
||||
> le_result_;
|
||||
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
bind5< F,T1,T2,T3,T4,T5 >
|
||||
, Tag
|
||||
, int_<6>
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind5<
|
||||
F
|
||||
, T1, T2, T3, T4, T5
|
||||
> result_;
|
||||
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
/// special case for 'protect'
|
||||
template< typename T, typename Tag >
|
||||
struct lambda< mpl::protect<T>,Tag, int_<1> >
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef mpl::protect<T> result_;
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
/// specializations for the main 'bind' form
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
, typename Tag
|
||||
>
|
||||
struct lambda<
|
||||
bind< F,T1,T2,T3,T4,T5 >
|
||||
, Tag
|
||||
, int_<6>
|
||||
>
|
||||
{
|
||||
typedef false_ is_le;
|
||||
typedef bind< F,T1,T2,T3,T4,T5 > result_;
|
||||
typedef result_ type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Tag1
|
||||
, typename Tag2
|
||||
, typename Arity
|
||||
>
|
||||
struct lambda<
|
||||
lambda< F,Tag1,Arity >
|
||||
, Tag2
|
||||
, int_<3>
|
||||
>
|
||||
{
|
||||
typedef lambda< F,Tag2 > l1;
|
||||
typedef lambda< Tag1,Tag2 > l2;
|
||||
typedef typename l1::is_le is_le;
|
||||
typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_;
|
||||
typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3;
|
||||
typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_;
|
||||
typedef typename le_result_::result_ result_;
|
||||
typedef typename le_result_::type type;
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda)
|
||||
|
||||
}}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user