add BOOST_MPL_AUX_NTTP_DECL macro

[SVN r16564]
This commit is contained in:
Aleksey Gurtovoy
2002-12-09 05:20:25 +00:00
parent 4ad98338dd
commit 5617d060fa
110 changed files with 963 additions and 507 deletions

View File

@@ -30,6 +30,7 @@
#include "boost/mpl/aux_/common_name_wknd.hpp"
#include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/config/nttp.hpp"
#include "boost/config.hpp"
namespace boost {
@@ -79,7 +80,7 @@ struct advance
template<
typename Iterator
, long N
, BOOST_MPL_AUX_NTTP_DECL(long, N)
>
struct advance_c
{
@@ -160,7 +161,7 @@ struct advance
template<
typename Iterator
, long N
, BOOST_MPL_AUX_NTTP_DECL(long, N)
>
struct advance_c
{

View File

@@ -42,10 +42,11 @@
# 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_/preprocessor/add.hpp"
# include "boost/mpl/aux_/preprocessor/sub.hpp"
# include "boost/mpl/aux_/config/dtp.hpp"
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/mpl/aux_/config/eti.hpp"
# include "boost/mpl/aux_/config/lambda.hpp"
@@ -90,12 +91,8 @@ namespace mpl {
/**/
# define AUX_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \
BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \
BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n)) \
BOOST_MPL_PP_ENUM( \
BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n) \
, def \
) \
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \
/**/
# define AUX_APPLY_N_SPEC_PARAMS(n, param) \
@@ -112,7 +109,7 @@ template<
struct apply;
#else
namespace aux {
template< int > struct apply_impl_chooser;
template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct apply_impl_chooser;
}
#endif

View File

@@ -21,6 +21,8 @@
#ifndef BOOST_MPL_ARG_HPP_INCLUDED
#define BOOST_MPL_ARG_HPP_INCLUDED
#include "boost/mpl/aux_/config/static_constant.hpp"
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/arg_fwd.hpp"
# include "boost/mpl/void.hpp"
@@ -31,8 +33,8 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp
# include "boost/mpl/aux_/include_preprocessed.hpp"
@@ -43,11 +45,11 @@
# 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_/config/nttp.hpp"
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/inc.hpp"
# include "boost/preprocessor/cat.hpp"
# include "boost/config.hpp"
namespace boost {
namespace mpl {

View File

@@ -17,10 +17,12 @@
#ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED
#define BOOST_MPL_ARG_FWD_HPP_INCLUDED
#include "boost/mpl/aux_/config/nttp.hpp"
namespace boost {
namespace mpl {
template< int N > struct arg;
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg;
} // namespace mpl
} // namespace boost

View File

@@ -21,6 +21,7 @@
#include "boost/mpl/aux_/typeof.hpp"
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
#include "boost/config.hpp"
@@ -66,6 +67,7 @@ struct divides
, BOOST_MPL_AUX_VALUE_WKND(T5)::value
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(5, divides, (T1,T2,T3,T4,T5))
};
BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,divides)

View File

@@ -21,6 +21,7 @@
#include "boost/mpl/aux_/typeof.hpp"
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
namespace boost {
@@ -58,6 +59,7 @@ struct minus
, BOOST_MPL_AUX_VALUE_WKND(T5)::value
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(5, minus, (T1,T2,T3,T4,T5))
};
BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,minus)

View File

@@ -21,6 +21,7 @@
#include "boost/mpl/aux_/typeof.hpp"
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
#include "boost/config.hpp"
@@ -60,6 +61,7 @@ struct modulus
, BOOST_MPL_AUX_VALUE_WKND(T2)::value
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (T1,T2))
};
BOOST_MPL_AUX_VOID_SPEC(2,modulus)

View File

@@ -21,6 +21,7 @@
#include "boost/mpl/aux_/typeof.hpp"
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
namespace boost {
@@ -58,9 +59,10 @@ struct multiplies
, BOOST_MPL_AUX_VALUE_WKND(T5)::value
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(5, multiplies, (T1,T2,T3,T4,T5))
};
BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,multiplies)
BOOST_MPL_AUX_VOID_SPEC_EXT(2, 5, multiplies)
} // namespace mpl
} // namespace boost

View File

@@ -20,6 +20,7 @@
#include "boost/mpl/integral_c.hpp"
#include "boost/mpl/aux_/typeof.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
namespace boost {
@@ -37,6 +38,8 @@ struct negate
#else
typedef integral_c<value_type, (-T::value)> type;
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, negate, (T))
};
BOOST_MPL_AUX_VOID_SPEC(1,negate)

View File

@@ -21,6 +21,7 @@
#include "boost/mpl/aux_/typeof.hpp"
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
namespace boost {
@@ -58,6 +59,7 @@ struct plus
, BOOST_MPL_AUX_VALUE_WKND(T5)::value
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(5, plus, (T1,T2,T3,T4,T5))
};
BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,plus)

View File

@@ -23,6 +23,7 @@
#include "boost/mpl/aux_/sequence_tag.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/mpl/aux_/config/nttp.hpp"
namespace boost {
namespace mpl {
@@ -40,7 +41,7 @@ struct at
template<
typename Sequence
, long N
, BOOST_MPL_AUX_NTTP_DECL(long, N)
>
struct at_c
: at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) >

View File

@@ -36,6 +36,8 @@
#else
# include "boost/mpl/limits/unrolling.hpp"
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/cat.hpp"
# include "boost/preprocessor/inc.hpp"
@@ -45,14 +47,14 @@ namespace mpl {
namespace aux {
// forward declaration
template< long N > struct advance_backward;
template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward;
# define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/advance_backward.hpp"))
# include BOOST_PP_ITERATE()
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
template< long N >
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
struct advance_backward
{
template< typename Iterator > struct apply

View File

@@ -36,6 +36,8 @@
#else
# include "boost/mpl/limits/unrolling.hpp"
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/cat.hpp"
# include "boost/preprocessor/inc.hpp"
@@ -45,14 +47,14 @@ namespace mpl {
namespace aux {
// forward declaration
template< long N > struct advance_forward;
template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward;
# define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/advance_forward.hpp"))
# include BOOST_PP_ITERATE()
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
template< long N >
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
struct advance_forward
{
template< typename Iterator > struct apply

View File

@@ -18,6 +18,7 @@
#define BOOST_MPL_AUX_ARITY_HPP_INCLUDED
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/mpl/aux_/config/nttp.hpp"
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
@@ -30,7 +31,7 @@ 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, int N >
template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) >
struct arity
{
BOOST_STATIC_CONSTANT(int, value = N);

View File

@@ -26,7 +26,7 @@
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \
namespace aux { \
template< int N, BOOST_MPL_PP_PARAMS(i,type T) > \
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 \

View File

@@ -21,6 +21,7 @@
# include "boost/mpl/aux_/apply.hpp"
# include "boost/mpl/aux_/next.hpp"
# include "boost/mpl/aux_/config/ctps.hpp"
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/mpl/limits/unrolling.hpp"
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
@@ -75,7 +76,7 @@ namespace aux {
//: forward declaration
template<
long N
BOOST_MPL_AUX_NTTP_DECL(long, N)
, typename First
, typename Last
, typename State
@@ -93,7 +94,7 @@ struct AUX_FOLD_IMPL_NAME;
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
template<
long N
BOOST_MPL_AUX_NTTP_DECL(long, N)
, typename First
, typename Last
, typename State
@@ -174,7 +175,7 @@ struct AUX_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp>
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template< long >
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
struct AUX_FOLD_CHUNK_NAME;
# define BOOST_PP_ITERATION_PARAMS_1 \
@@ -182,7 +183,7 @@ struct AUX_FOLD_CHUNK_NAME;
# include BOOST_PP_ITERATE()
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
template< long N >
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
struct AUX_FOLD_CHUNK_NAME
{
template<
@@ -304,7 +305,7 @@ struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step)
};
template<
long N
BOOST_MPL_AUX_NTTP_DECL(long, N)
, typename First
, typename Last
, typename State

View File

@@ -20,7 +20,8 @@
# include "boost/mpl/aux_/apply.hpp"
# include "boost/mpl/aux_/next.hpp"
# include "boost/config.hpp"
# include "boost/mpl/aux_/config/ctps.hpp"
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/mpl/limits/unrolling.hpp"
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
@@ -55,7 +56,7 @@ namespace aux {
//: forward declaration
template<
long N
BOOST_MPL_AUX_NTTP_DECL(long, N)
, typename First
, typename Last
, typename State
@@ -73,7 +74,7 @@ struct AUX_FOLD_IMPL_NAME;
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
template<
long N
BOOST_MPL_AUX_NTTP_DECL(long, N)
, typename First
, typename Last
, typename State
@@ -135,7 +136,7 @@ struct AUX_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp>
// Borland have some serious problems with the unrolled version, so
// we always use a basic implementation
template<
long N
BOOST_MPL_AUX_NTTP_DECL(long, N)
, typename First
, typename Last
, typename State
@@ -157,7 +158,7 @@ struct AUX_FOLD_IMPL_NAME
};
template<
long N
BOOST_MPL_AUX_NTTP_DECL(long, N)
, typename Last
, typename State
, typename ForwardOp
@@ -173,7 +174,7 @@ struct AUX_FOLD_IMPL_NAME<N,Last,Last,State,ForwardOp >
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template< long >
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
struct AUX_FOLD_CHUNK_NAME;
# define BOOST_PP_ITERATION_PARAMS_1 \
@@ -181,7 +182,7 @@ struct AUX_FOLD_CHUNK_NAME;
# include BOOST_PP_ITERATE()
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
template< long N >
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
struct AUX_FOLD_CHUNK_NAME
{
template<
@@ -284,7 +285,7 @@ struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step)
};
template<
long N
BOOST_MPL_AUX_NTTP_DECL(long, N)
, typename First
, typename Last
, typename State

View File

@@ -0,0 +1,31 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/ice_cast.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED
#define BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED
#include "boost/config.hpp"
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__GNUC__) && __GNUC__ < 3
# define BOOST_MPL_AUX_ICE_CAST(T, expr) expr
#elif defined(__MWERKS__) && __MWERKS__ <= 0x3001
# define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr)
#else
# define BOOST_MPL_AUX_ICE_CAST(T, expr) static_cast<T>(expr)
#endif
#endif // BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED

View File

@@ -21,8 +21,8 @@
#include "boost/mpl/aux_/config/ctps.hpp"
#include "boost/type_traits/is_same.hpp"
namespace boost {
namespace mpl {
namespace boost { namespace mpl {
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
@@ -128,14 +128,13 @@ struct joint_iter
::template result_<Iterator1,LastIterator1,Iterator2>
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace aux
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::joint_iter)
} // namespace mpl
} // namespace boost
}} // namespace boost::mpl
#endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED

View File

@@ -39,6 +39,7 @@
#else
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/mpl/limits/arity.hpp"
# include "boost/mpl/aux_/preprocessor/params.hpp"
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
@@ -59,7 +60,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< BOOST_MPL_AUX_NTTP_DECL(int, arity_), bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -75,12 +76,14 @@ template< int arity, bool Protect > struct lambda_impl
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
, Protect
#else
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, bool_c<Protect>::value >
, bool_c<Protect>::value
#endif
::template result_<T>
>::template result_<T>
{
};

View File

@@ -6,7 +6,7 @@ namespace mpl {
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
static int const value = -1;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
template<
@@ -20,7 +20,7 @@ template<> struct arg<-1>
template<> struct arg<1>
{
BOOST_STATIC_CONSTANT(int, value = 1);
static int const value = 1;
typedef arg<2> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -35,7 +35,7 @@ template<> struct arg<1>
template<> struct arg<2>
{
BOOST_STATIC_CONSTANT(int, value = 2);
static int const value = 2;
typedef arg<3> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -50,7 +50,7 @@ template<> struct arg<2>
template<> struct arg<3>
{
BOOST_STATIC_CONSTANT(int, value = 3);
static int const value = 3;
typedef arg<4> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -65,7 +65,7 @@ template<> struct arg<3>
template<> struct arg<4>
{
BOOST_STATIC_CONSTANT(int, value = 4);
static int const value = 4;
typedef arg<5> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -80,7 +80,7 @@ template<> struct arg<4>
template<> struct arg<5>
{
BOOST_STATIC_CONSTANT(int, value = 5);
static int const value = 5;
typedef arg<6> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)

View File

@@ -16,7 +16,7 @@ template<
>
struct fold_backward_impl;
template< long >
template< long N >
struct fold_backward_chunk;
template<>

View File

@@ -16,7 +16,7 @@ template<
>
struct iter_fold_backward_impl;
template< long >
template< long N >
struct iter_fold_backward_chunk;
template<>

View File

@@ -54,7 +54,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
typedef typename impl_::state state;
@@ -71,7 +71,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
typedef typename impl_::state state;

View File

@@ -12,7 +12,7 @@ struct lambda_helper1
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 1);
static int const arity = 1;
typedef T1 arg1;
template< typename U1 > struct apply
@@ -30,7 +30,7 @@ struct lambda_helper2
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 2);
static int const arity = 2;
typedef T1 arg1;
typedef T2 arg2;
@@ -49,7 +49,7 @@ struct lambda_helper3
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 3);
static int const arity = 3;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -69,7 +69,7 @@ struct lambda_helper4
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 4);
static int const arity = 4;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -97,7 +97,7 @@ struct lambda_helper5
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 5);
static int const arity = 5;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;

View File

@@ -6,7 +6,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
, Protect
::template result_<T>
>::template result_<T>
{
};

View File

@@ -6,7 +6,7 @@ namespace mpl {
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
static int const value = -1;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
template<
@@ -21,7 +21,7 @@ template<> struct arg<-1>
template<> struct arg<1>
{
BOOST_STATIC_CONSTANT(int, value = 1);
static int const value = 1;
typedef arg<2> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -37,7 +37,7 @@ template<> struct arg<1>
template<> struct arg<2>
{
BOOST_STATIC_CONSTANT(int, value = 2);
static int const value = 2;
typedef arg<3> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -53,7 +53,7 @@ template<> struct arg<2>
template<> struct arg<3>
{
BOOST_STATIC_CONSTANT(int, value = 3);
static int const value = 3;
typedef arg<4> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -69,7 +69,7 @@ template<> struct arg<3>
template<> struct arg<4>
{
BOOST_STATIC_CONSTANT(int, value = 4);
static int const value = 4;
typedef arg<5> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -85,7 +85,7 @@ template<> struct arg<4>
template<> struct arg<5>
{
BOOST_STATIC_CONSTANT(int, value = 5);
static int const value = 5;
typedef arg<6> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)

View File

@@ -16,7 +16,7 @@ template<
>
struct fold_backward_impl;
template< long >
template< long N >
struct fold_backward_chunk;
template<>

View File

@@ -16,7 +16,7 @@ template<
>
struct iter_fold_backward_impl;
template< long >
template< long N >
struct iter_fold_backward_chunk;
template<>

View File

@@ -54,7 +54,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
typedef typename impl_::state state;
@@ -71,7 +71,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
typedef typename impl_::state state;

View File

@@ -12,7 +12,7 @@ struct lambda_helper1
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 1);
static int const arity = 1;
typedef T1 arg1;
template< typename U1 > struct apply
@@ -30,7 +30,7 @@ struct lambda_helper2
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 2);
static int const arity = 2;
typedef T1 arg1;
typedef T2 arg2;
@@ -49,7 +49,7 @@ struct lambda_helper3
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 3);
static int const arity = 3;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -69,7 +69,7 @@ struct lambda_helper4
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 4);
static int const arity = 4;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -97,7 +97,7 @@ struct lambda_helper5
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 5);
static int const arity = 5;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;

View File

@@ -6,7 +6,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
, Protect
::template result_<T>
>::template result_<T>
{
};

View File

@@ -6,7 +6,7 @@ namespace mpl {
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
static int const value = -1;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
template<
@@ -18,7 +18,7 @@ template<> struct arg<-1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -26,7 +26,7 @@ template<> struct arg<-1>
template<> struct arg<1>
{
BOOST_STATIC_CONSTANT(int, value = 1);
static int const value = 1;
typedef arg<2> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -39,7 +39,7 @@ template<> struct arg<1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -47,7 +47,7 @@ template<> struct arg<1>
template<> struct arg<2>
{
BOOST_STATIC_CONSTANT(int, value = 2);
static int const value = 2;
typedef arg<3> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -60,7 +60,7 @@ template<> struct arg<2>
typedef U2 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -68,7 +68,7 @@ template<> struct arg<2>
template<> struct arg<3>
{
BOOST_STATIC_CONSTANT(int, value = 3);
static int const value = 3;
typedef arg<4> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -81,7 +81,7 @@ template<> struct arg<3>
typedef U3 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -89,7 +89,7 @@ template<> struct arg<3>
template<> struct arg<4>
{
BOOST_STATIC_CONSTANT(int, value = 4);
static int const value = 4;
typedef arg<5> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -102,7 +102,7 @@ template<> struct arg<4>
typedef U4 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -110,7 +110,7 @@ template<> struct arg<4>
template<> struct arg<5>
{
BOOST_STATIC_CONSTANT(int, value = 5);
static int const value = 5;
typedef arg<6> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -123,7 +123,7 @@ template<> struct arg<5>
typedef U5 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};

View File

@@ -54,7 +54,7 @@ struct iter_fold_if_forward_step
{
typedef typename Predicate::template apply< State,Iterator >::type not_last;
typedef typename iter_fold_if_step_impl<
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
typedef typename impl_::state state;
@@ -71,7 +71,7 @@ struct iter_fold_if_backward_step
{
typedef typename Predicate::template apply< State,Iterator >::type not_last;
typedef typename iter_fold_if_step_impl<
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
typedef typename impl_::state state;

View File

@@ -12,7 +12,7 @@ struct lambda_helper1
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 1);
static int const arity = 1;
typedef T1 arg1;
template< typename U1 > struct apply
@@ -30,7 +30,7 @@ struct lambda_helper2
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 2);
static int const arity = 2;
typedef T1 arg1;
typedef T2 arg2;
@@ -49,7 +49,7 @@ struct lambda_helper3
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 3);
static int const arity = 3;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -69,7 +69,7 @@ struct lambda_helper4
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 4);
static int const arity = 4;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -97,7 +97,7 @@ struct lambda_helper5
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 5);
static int const arity = 5;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;

View File

@@ -6,7 +6,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
, Protect
::template result_<T>
>::template result_<T>
{
};

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< long N > struct advance_backward;
template< nttp_long N > struct advance_backward;
template<>
struct advance_backward<0>
@@ -102,7 +102,7 @@ struct advance_backward<4>
};
template< long N >
template< nttp_long N >
struct advance_backward
{
template< typename Iterator > struct apply

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< long N > struct advance_forward;
template< nttp_long N > struct advance_forward;
template<>
struct advance_forward<0>
@@ -102,7 +102,7 @@ struct advance_forward<4>
};
template< long N >
template< nttp_long N >
struct advance_forward
{
template< typename Iterator > struct apply

View File

@@ -6,7 +6,7 @@ namespace mpl {
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
enum { value = -1 };
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
template<
@@ -18,7 +18,7 @@ template<> struct arg<-1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -26,7 +26,7 @@ template<> struct arg<-1>
template<> struct arg<1>
{
BOOST_STATIC_CONSTANT(int, value = 1);
enum { value = 1 };
typedef arg<2> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -39,7 +39,7 @@ template<> struct arg<1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -47,7 +47,7 @@ template<> struct arg<1>
template<> struct arg<2>
{
BOOST_STATIC_CONSTANT(int, value = 2);
enum { value = 2 };
typedef arg<3> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -60,7 +60,7 @@ template<> struct arg<2>
typedef U2 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -68,7 +68,7 @@ template<> struct arg<2>
template<> struct arg<3>
{
BOOST_STATIC_CONSTANT(int, value = 3);
enum { value = 3 };
typedef arg<4> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -81,7 +81,7 @@ template<> struct arg<3>
typedef U3 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -89,7 +89,7 @@ template<> struct arg<3>
template<> struct arg<4>
{
BOOST_STATIC_CONSTANT(int, value = 4);
enum { value = 4 };
typedef arg<5> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -102,7 +102,7 @@ template<> struct arg<4>
typedef U4 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -110,7 +110,7 @@ template<> struct arg<4>
template<> struct arg<5>
{
BOOST_STATIC_CONSTANT(int, value = 5);
enum { value = 5 };
typedef arg<6> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -123,7 +123,7 @@ template<> struct arg<5>
typedef U5 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};

View File

@@ -51,22 +51,42 @@ template< typename F, typename T > struct bind2nd;
namespace aux {
template< int > struct bind_impl_chooser;
template< nttp_int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
template< int N >
template< nttp_int N >
aux::yes_tag is_bind_helper(arg<N>*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*);
template< typename T > struct is_bind_template
template< bool is_ref_ = true >
struct is_bind_template_impl
{
template< typename T > struct result_
{
enum { value = false };
};
};
template<>
struct is_bind_template_impl<false>
{
template< typename T > struct result_
{
enum { value =
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
};
};
};
template< typename T > struct is_bind_template
: is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
::template result_<T>
{
BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
);
};
} // namespace aux

View File

@@ -77,42 +77,41 @@ template< typename F, typename T > struct bind2nd;
namespace aux {
template< int > struct bind_impl_chooser;
template< nttp_int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
template< int N >
template< nttp_int N >
aux::yes_tag is_bind_helper(arg<N>*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*);
template < bool ref = true >
template< bool is_ref_ = true >
struct is_bind_template_impl
{
template < typename T >
struct apply
template< typename T > struct result_
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
};
template <>
template<>
struct is_bind_template_impl<false>
{
template< typename T >
struct apply
template< typename T > struct result_
{
BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
);
enum { value =
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
};
};
};
template< typename T > struct is_bind_template
: is_bind_template_impl<boost::detail::is_reference_impl< T >::value>
::template apply< T >
: is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
::template result_<T>
{
};

View File

@@ -7,7 +7,7 @@ namespace aux {
// forward declaration
template<
long N
nttp_long N
, typename First
, typename Last
, typename State
@@ -16,7 +16,7 @@ template<
>
struct fold_backward_impl;
template< long >
template< nttp_long N >
struct fold_backward_chunk;
template<>
@@ -203,7 +203,7 @@ struct fold_backward_chunk<4>
};
template< long N >
template< nttp_long N >
struct fold_backward_chunk
{
template<
@@ -320,7 +320,7 @@ struct fold_backward_step
};
template<
long N
nttp_long N
, typename First
, typename Last
, typename State

View File

@@ -7,7 +7,7 @@ namespace aux {
// forward declaration
template<
long N
nttp_long N
, typename First
, typename Last
, typename State
@@ -15,7 +15,7 @@ template<
>
struct fold_impl;
template< long >
template< nttp_long N >
struct fold_chunk;
template<>
@@ -176,7 +176,7 @@ struct fold_chunk<4>
};
template< long N >
template< nttp_long N >
struct fold_chunk
{
template<
@@ -276,7 +276,7 @@ struct fold_step
};
template<
long N
nttp_long N
, typename First
, typename Last
, typename State

View File

@@ -7,7 +7,7 @@ namespace aux {
// forward declaration
template<
long N
nttp_long N
, typename First
, typename Last
, typename State
@@ -16,7 +16,7 @@ template<
>
struct iter_fold_backward_impl;
template< long >
template< nttp_long N >
struct iter_fold_backward_chunk;
template<>
@@ -203,7 +203,7 @@ struct iter_fold_backward_chunk<4>
};
template< long N >
template< nttp_long N >
struct iter_fold_backward_chunk
{
template<
@@ -320,7 +320,7 @@ struct iter_fold_backward_step
};
template<
long N
nttp_long N
, typename First
, typename Last
, typename State

View File

@@ -54,7 +54,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
typedef typename impl_::state state;
@@ -71,7 +71,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
typedef typename impl_::state state;

View File

@@ -7,7 +7,7 @@ namespace aux {
// forward declaration
template<
long N
nttp_long N
, typename First
, typename Last
, typename State
@@ -15,7 +15,7 @@ template<
>
struct iter_fold_impl;
template< long >
template< nttp_long N >
struct iter_fold_chunk;
template<>
@@ -176,7 +176,7 @@ struct iter_fold_chunk<4>
};
template< long N >
template< nttp_long N >
struct iter_fold_chunk
{
template<
@@ -276,7 +276,7 @@ struct iter_fold_step
};
template<
long N
nttp_long N
, typename First
, typename Last
, typename State

View File

@@ -12,7 +12,7 @@ struct lambda_helper1
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 1);
enum { arity = 1 };
typedef T1 arg1;
template< typename U1 > struct apply
@@ -30,7 +30,7 @@ struct lambda_helper2
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 2);
enum { arity = 2 };
typedef T1 arg1;
typedef T2 arg2;
@@ -49,7 +49,7 @@ struct lambda_helper3
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 3);
enum { arity = 3 };
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -69,7 +69,7 @@ struct lambda_helper4
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 4);
enum { arity = 4 };
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -97,7 +97,7 @@ struct lambda_helper5
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 5);
enum { arity = 5 };
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;

View File

@@ -6,7 +6,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< nttp_int arity_, bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, bool_c<Protect>::value >
, bool_c<Protect>::value
::template result_<T>
>::template result_<T>
{
};

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct list_impl_chooser;
template< nttp_int N > struct list_impl_chooser;
}
namespace aux {
@@ -222,13 +222,13 @@ namespace aux {
template< typename T >
struct is_list_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_list_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
@@ -237,7 +237,13 @@ template<
>
struct list_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_list_arg<T1>::value + is_list_arg<T2>::value + is_list_arg<T3>::value + is_list_arg<T4>::value + is_list_arg<T5>::value + is_list_arg<T6>::value + is_list_arg<T7>::value + is_list_arg<T8>::value + is_list_arg<T9>::value + is_list_arg<T10>::value);
enum { value =
is_list_arg<T1>::value + is_list_arg<T2>::value
+ is_list_arg<T3>::value + is_list_arg<T4>::value
+ is_list_arg<T5>::value + is_list_arg<T6>::value
+ is_list_arg<T7>::value + is_list_arg<T8>::value
+ is_list_arg<T9>::value + is_list_arg<T10>::value
};
};
template<
@@ -247,8 +253,9 @@ template<
struct list_impl
{
typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_;
typedef typename aux::list_impl_chooser< arg_num_::value >
::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
typedef typename aux::list_impl_chooser<
arg_num_::value
>::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
};
} // namespace aux

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct list_c_impl_chooser;
template< nttp_int N > struct list_c_impl_chooser;
}
namespace aux {
@@ -15,8 +15,9 @@ struct list_c_impl_chooser<0>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -35,8 +36,9 @@ struct list_c_impl_chooser<1>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -55,8 +57,9 @@ struct list_c_impl_chooser<2>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -75,8 +78,9 @@ struct list_c_impl_chooser<3>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -95,8 +99,9 @@ struct list_c_impl_chooser<4>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -115,8 +120,9 @@ struct list_c_impl_chooser<5>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -135,8 +141,9 @@ struct list_c_impl_chooser<6>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -155,8 +162,9 @@ struct list_c_impl_chooser<7>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -175,8 +183,9 @@ struct list_c_impl_chooser<8>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -195,8 +204,9 @@ struct list_c_impl_chooser<9>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -215,8 +225,9 @@ struct list_c_impl_chooser<10>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -230,31 +241,37 @@ struct list_c_impl_chooser<10>
namespace aux {
template< long T >
template< nttp_long T >
struct is_list_c_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_list_c_arg<LONG_MAX>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8
, long T9, long T10
nttp_long T1, nttp_long T2, nttp_long T3, nttp_long T4, nttp_long T5
, nttp_long T6, nttp_long T7, nttp_long T8, nttp_long T9, nttp_long T10
>
struct list_c_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_list_c_arg<T1>::value + is_list_c_arg<T2>::value + is_list_c_arg<T3>::value + is_list_c_arg<T4>::value + is_list_c_arg<T5>::value + is_list_c_arg<T6>::value + is_list_c_arg<T7>::value + is_list_c_arg<T8>::value + is_list_c_arg<T9>::value + is_list_c_arg<T10>::value);
enum { value =
is_list_c_arg<T1>::value + is_list_c_arg<T2>::value
+ is_list_c_arg<T3>::value + is_list_c_arg<T4>::value
+ is_list_c_arg<T5>::value + is_list_c_arg<T6>::value
+ is_list_c_arg<T7>::value + is_list_c_arg<T8>::value
+ is_list_c_arg<T9>::value + is_list_c_arg<T10>::value
};
};
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7
, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3, nttp_long C4
, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8, nttp_long C9
>
struct list_c_impl
{
@@ -267,10 +284,10 @@ struct list_c_impl
template<
typename T
, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
, long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
, long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
, long C9 = LONG_MAX
, nttp_long C0 = LONG_MAX, nttp_long C1 = LONG_MAX
, nttp_long C2 = LONG_MAX, nttp_long C3 = LONG_MAX, nttp_long C4 = LONG_MAX
, nttp_long C5 = LONG_MAX, nttp_long C6 = LONG_MAX, nttp_long C7 = LONG_MAX
, nttp_long C8 = LONG_MAX, nttp_long C9 = LONG_MAX
>
struct list_c
: aux::list_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct vector_impl_chooser;
template< nttp_int N > struct vector_impl_chooser;
}
namespace aux {
@@ -222,13 +222,13 @@ namespace aux {
template< typename T >
struct is_vector_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_vector_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
@@ -237,7 +237,13 @@ template<
>
struct vector_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_vector_arg<T1>::value + is_vector_arg<T2>::value + is_vector_arg<T3>::value + is_vector_arg<T4>::value + is_vector_arg<T5>::value + is_vector_arg<T6>::value + is_vector_arg<T7>::value + is_vector_arg<T8>::value + is_vector_arg<T9>::value + is_vector_arg<T10>::value);
enum { value =
is_vector_arg<T1>::value + is_vector_arg<T2>::value
+ is_vector_arg<T3>::value + is_vector_arg<T4>::value
+ is_vector_arg<T5>::value + is_vector_arg<T6>::value
+ is_vector_arg<T7>::value + is_vector_arg<T8>::value
+ is_vector_arg<T9>::value + is_vector_arg<T10>::value
};
};
template<

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct vector_c_impl_chooser;
template< nttp_int N > struct vector_c_impl_chooser;
}
namespace aux {
@@ -15,8 +15,9 @@ struct vector_c_impl_chooser<0>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -35,8 +36,9 @@ struct vector_c_impl_chooser<1>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -55,8 +57,9 @@ struct vector_c_impl_chooser<2>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -75,8 +78,9 @@ struct vector_c_impl_chooser<3>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -95,8 +99,9 @@ struct vector_c_impl_chooser<4>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -115,8 +120,9 @@ struct vector_c_impl_chooser<5>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -135,8 +141,9 @@ struct vector_c_impl_chooser<6>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -155,8 +162,9 @@ struct vector_c_impl_chooser<7>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -175,8 +183,9 @@ struct vector_c_impl_chooser<8>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -195,8 +204,9 @@ struct vector_c_impl_chooser<9>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -215,8 +225,9 @@ struct vector_c_impl_chooser<10>
{
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6
, long C7, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3
, nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8
, nttp_long C9
>
struct result_
{
@@ -230,31 +241,37 @@ struct vector_c_impl_chooser<10>
namespace aux {
template< long T >
template< nttp_long T >
struct is_vector_c_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_vector_c_arg<LONG_MAX>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8
, long T9, long T10
nttp_long T1, nttp_long T2, nttp_long T3, nttp_long T4, nttp_long T5
, nttp_long T6, nttp_long T7, nttp_long T8, nttp_long T9, nttp_long T10
>
struct vector_c_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value + is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value + is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value + is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value + is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value);
enum { value =
is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value
+ is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value
+ is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value
+ is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value
+ is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value
};
};
template<
typename T
, long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7
, long C8, long C9
, nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3, nttp_long C4
, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8, nttp_long C9
>
struct vector_c_impl
{
@@ -267,10 +284,10 @@ struct vector_c_impl
template<
typename T
, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
, long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
, long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
, long C9 = LONG_MAX
, nttp_long C0 = LONG_MAX, nttp_long C1 = LONG_MAX
, nttp_long C2 = LONG_MAX, nttp_long C3 = LONG_MAX, nttp_long C4 = LONG_MAX
, nttp_long C5 = LONG_MAX, nttp_long C6 = LONG_MAX, nttp_long C7 = LONG_MAX
, nttp_long C8 = LONG_MAX, nttp_long C9 = LONG_MAX
>
struct vector_c
: aux::vector_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct apply_impl_chooser;
template< int arity_ > struct apply_impl_chooser;
}
template< typename F >
@@ -263,13 +263,13 @@ namespace aux {
template< typename T >
struct is_apply_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_apply_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
@@ -277,7 +277,11 @@ template<
>
struct apply_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_apply_arg<T1>::value + is_apply_arg<T2>::value + is_apply_arg<T3>::value + is_apply_arg<T4>::value + is_apply_arg<T5>::value);
enum { value =
is_apply_arg<T1>::value + is_apply_arg<T2>::value
+ is_apply_arg<T3>::value + is_apply_arg<T4>::value
+ is_apply_arg<T5>::value
};
};
} // namespace aux

View File

@@ -6,7 +6,7 @@ namespace mpl {
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
enum { value = -1 };
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
template<
@@ -18,7 +18,7 @@ template<> struct arg<-1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -26,7 +26,7 @@ template<> struct arg<-1>
template<> struct arg<1>
{
BOOST_STATIC_CONSTANT(int, value = 1);
enum { value = 1 };
typedef arg<2> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -39,7 +39,7 @@ template<> struct arg<1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -47,7 +47,7 @@ template<> struct arg<1>
template<> struct arg<2>
{
BOOST_STATIC_CONSTANT(int, value = 2);
enum { value = 2 };
typedef arg<3> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -60,7 +60,7 @@ template<> struct arg<2>
typedef U2 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -68,7 +68,7 @@ template<> struct arg<2>
template<> struct arg<3>
{
BOOST_STATIC_CONSTANT(int, value = 3);
enum { value = 3 };
typedef arg<4> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -81,7 +81,7 @@ template<> struct arg<3>
typedef U3 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -89,7 +89,7 @@ template<> struct arg<3>
template<> struct arg<4>
{
BOOST_STATIC_CONSTANT(int, value = 4);
enum { value = 4 };
typedef arg<5> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -102,7 +102,7 @@ template<> struct arg<4>
typedef U4 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};
@@ -110,7 +110,7 @@ template<> struct arg<4>
template<> struct arg<5>
{
BOOST_STATIC_CONSTANT(int, value = 5);
enum { value = 5 };
typedef arg<6> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -123,7 +123,7 @@ template<> struct arg<5>
typedef U5 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
enum { nv = !is_void_<type>::value };
BOOST_STATIC_ASSERT(nv);
};

View File

@@ -51,7 +51,7 @@ template< typename F, typename T > struct bind2nd;
namespace aux {
template< int > struct bind_impl_chooser;
template< int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
@@ -62,11 +62,31 @@ aux::yes_tag is_bind_helper(arg<N>*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*);
template< typename T > struct is_bind_template
template< bool is_ref_ = true >
struct is_bind_template_impl
{
template< typename T > struct result_
{
enum { value = false };
};
};
template<>
struct is_bind_template_impl<false>
{
template< typename T > struct result_
{
enum { value =
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
};
};
};
template< typename T > struct is_bind_template
: is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
::template result_<T>
{
BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
);
};
} // namespace aux

View File

@@ -77,7 +77,7 @@ template< typename F, typename T > struct bind2nd;
namespace aux {
template< int > struct bind_impl_chooser;
template< int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
@@ -88,31 +88,30 @@ aux::yes_tag is_bind_helper(arg<N>*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*);
template < bool ref = true >
template< bool is_ref_ = true >
struct is_bind_template_impl
{
template < typename T >
struct apply
template< typename T > struct result_
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
};
template <>
template<>
struct is_bind_template_impl<false>
{
template< typename T >
struct apply
template< typename T > struct result_
{
BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
);
enum { value =
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
};
};
};
template< typename T > struct is_bind_template
: is_bind_template_impl<boost::detail::is_reference_impl< T >::value>
::template apply< T >
: is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
::template result_<T>
{
};

View File

@@ -16,7 +16,7 @@ template<
>
struct fold_backward_impl;
template< long >
template< long N >
struct fold_backward_chunk;
template<>

View File

@@ -15,7 +15,7 @@ template<
>
struct fold_impl;
template< long >
template< long N >
struct fold_chunk;
template<>

View File

@@ -16,7 +16,7 @@ template<
>
struct iter_fold_backward_impl;
template< long >
template< long N >
struct iter_fold_backward_chunk;
template<>

View File

@@ -54,7 +54,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
typedef typename impl_::state state;
@@ -71,7 +71,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
typedef typename impl_::state state;

View File

@@ -15,7 +15,7 @@ template<
>
struct iter_fold_impl;
template< long >
template< long N >
struct iter_fold_chunk;
template<>

View File

@@ -12,7 +12,7 @@ struct lambda_helper1
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 1);
enum { arity = 1 };
typedef T1 arg1;
template< typename U1 > struct apply
@@ -30,7 +30,7 @@ struct lambda_helper2
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 2);
enum { arity = 2 };
typedef T1 arg1;
typedef T2 arg2;
@@ -49,7 +49,7 @@ struct lambda_helper3
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 3);
enum { arity = 3 };
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -69,7 +69,7 @@ struct lambda_helper4
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 4);
enum { arity = 4 };
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -97,7 +97,7 @@ struct lambda_helper5
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 5);
enum { arity = 5 };
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;

View File

@@ -6,7 +6,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
, Protect
::template result_<T>
>::template result_<T>
{
};

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct list_impl_chooser;
template< int N > struct list_impl_chooser;
}
namespace aux {
@@ -222,13 +222,13 @@ namespace aux {
template< typename T >
struct is_list_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_list_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
@@ -237,7 +237,13 @@ template<
>
struct list_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_list_arg<T1>::value + is_list_arg<T2>::value + is_list_arg<T3>::value + is_list_arg<T4>::value + is_list_arg<T5>::value + is_list_arg<T6>::value + is_list_arg<T7>::value + is_list_arg<T8>::value + is_list_arg<T9>::value + is_list_arg<T10>::value);
enum { value =
is_list_arg<T1>::value + is_list_arg<T2>::value
+ is_list_arg<T3>::value + is_list_arg<T4>::value
+ is_list_arg<T5>::value + is_list_arg<T6>::value
+ is_list_arg<T7>::value + is_list_arg<T8>::value
+ is_list_arg<T9>::value + is_list_arg<T10>::value
};
};
template<
@@ -247,8 +253,9 @@ template<
struct list_impl
{
typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_;
typedef typename aux::list_impl_chooser< arg_num_::value >
::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
typedef typename aux::list_impl_chooser<
arg_num_::value
>::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
};
} // namespace aux

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct list_c_impl_chooser;
template< int N > struct list_c_impl_chooser;
}
namespace aux {
@@ -233,13 +233,13 @@ namespace aux {
template< long T >
struct is_list_c_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_list_c_arg<LONG_MAX>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
@@ -248,7 +248,13 @@ template<
>
struct list_c_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_list_c_arg<T1>::value + is_list_c_arg<T2>::value + is_list_c_arg<T3>::value + is_list_c_arg<T4>::value + is_list_c_arg<T5>::value + is_list_c_arg<T6>::value + is_list_c_arg<T7>::value + is_list_c_arg<T8>::value + is_list_c_arg<T9>::value + is_list_c_arg<T10>::value);
enum { value =
is_list_c_arg<T1>::value + is_list_c_arg<T2>::value
+ is_list_c_arg<T3>::value + is_list_c_arg<T4>::value
+ is_list_c_arg<T5>::value + is_list_c_arg<T6>::value
+ is_list_c_arg<T7>::value + is_list_c_arg<T8>::value
+ is_list_c_arg<T9>::value + is_list_c_arg<T10>::value
};
};
template<

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct vector_impl_chooser;
template< int N > struct vector_impl_chooser;
}
namespace aux {
@@ -222,13 +222,13 @@ namespace aux {
template< typename T >
struct is_vector_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_vector_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
@@ -237,7 +237,13 @@ template<
>
struct vector_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_vector_arg<T1>::value + is_vector_arg<T2>::value + is_vector_arg<T3>::value + is_vector_arg<T4>::value + is_vector_arg<T5>::value + is_vector_arg<T6>::value + is_vector_arg<T7>::value + is_vector_arg<T8>::value + is_vector_arg<T9>::value + is_vector_arg<T10>::value);
enum { value =
is_vector_arg<T1>::value + is_vector_arg<T2>::value
+ is_vector_arg<T3>::value + is_vector_arg<T4>::value
+ is_vector_arg<T5>::value + is_vector_arg<T6>::value
+ is_vector_arg<T7>::value + is_vector_arg<T8>::value
+ is_vector_arg<T9>::value + is_vector_arg<T10>::value
};
};
template<

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct vector_c_impl_chooser;
template< int N > struct vector_c_impl_chooser;
}
namespace aux {
@@ -233,13 +233,13 @@ namespace aux {
template< long T >
struct is_vector_c_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
enum { value = true };
};
template<>
struct is_vector_c_arg<LONG_MAX>
{
BOOST_STATIC_CONSTANT(bool, value = false);
enum { value = false };
};
template<
@@ -248,7 +248,13 @@ template<
>
struct vector_c_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value + is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value + is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value + is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value + is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value);
enum { value =
is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value
+ is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value
+ is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value
+ is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value
+ is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value
};
};
template<

View File

@@ -6,7 +6,7 @@ namespace mpl {
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
static int const value = -1;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
template<
@@ -18,7 +18,7 @@ template<> struct arg<-1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -26,7 +26,7 @@ template<> struct arg<-1>
template<> struct arg<1>
{
BOOST_STATIC_CONSTANT(int, value = 1);
static int const value = 1;
typedef arg<2> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -39,7 +39,7 @@ template<> struct arg<1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -47,7 +47,7 @@ template<> struct arg<1>
template<> struct arg<2>
{
BOOST_STATIC_CONSTANT(int, value = 2);
static int const value = 2;
typedef arg<3> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -60,7 +60,7 @@ template<> struct arg<2>
typedef U2 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -68,7 +68,7 @@ template<> struct arg<2>
template<> struct arg<3>
{
BOOST_STATIC_CONSTANT(int, value = 3);
static int const value = 3;
typedef arg<4> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -81,7 +81,7 @@ template<> struct arg<3>
typedef U3 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -89,7 +89,7 @@ template<> struct arg<3>
template<> struct arg<4>
{
BOOST_STATIC_CONSTANT(int, value = 4);
static int const value = 4;
typedef arg<5> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -102,7 +102,7 @@ template<> struct arg<4>
typedef U4 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -110,7 +110,7 @@ template<> struct arg<4>
template<> struct arg<5>
{
BOOST_STATIC_CONSTANT(int, value = 5);
static int const value = 5;
typedef arg<6> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -123,7 +123,7 @@ template<> struct arg<5>
typedef U5 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};

View File

@@ -54,7 +54,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
typedef typename impl_::state state;
@@ -71,7 +71,7 @@ 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_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
typedef typename impl_::state state;

View File

@@ -12,7 +12,7 @@ struct lambda_helper1
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 1);
static int const arity = 1;
typedef T1 arg1;
template< typename U1 > struct apply
@@ -30,7 +30,7 @@ struct lambda_helper2
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 2);
static int const arity = 2;
typedef T1 arg1;
typedef T2 arg2;
@@ -49,7 +49,7 @@ struct lambda_helper3
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 3);
static int const arity = 3;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -69,7 +69,7 @@ struct lambda_helper4
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 4);
static int const arity = 4;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -97,7 +97,7 @@ struct lambda_helper5
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 5);
static int const arity = 5;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;

View File

@@ -6,7 +6,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
, Protect
::template result_<T>
>::template result_<T>
{
};

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct apply_impl_chooser;
template< int arity_ > struct apply_impl_chooser;
}
template< typename F >
@@ -263,13 +263,13 @@ namespace aux {
template< typename T >
struct is_apply_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
static bool const value = true;
};
template<>
struct is_apply_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
static bool const value = false;
};
template<
@@ -277,7 +277,11 @@ template<
>
struct apply_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_apply_arg<T1>::value + is_apply_arg<T2>::value + is_apply_arg<T3>::value + is_apply_arg<T4>::value + is_apply_arg<T5>::value);
static int const value =
is_apply_arg<T1>::value + is_apply_arg<T2>::value
+ is_apply_arg<T3>::value + is_apply_arg<T4>::value
+ is_apply_arg<T5>::value
;
};
} // namespace aux

View File

@@ -6,7 +6,7 @@ namespace mpl {
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
static int const value = -1;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
template<
@@ -18,7 +18,7 @@ template<> struct arg<-1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -26,7 +26,7 @@ template<> struct arg<-1>
template<> struct arg<1>
{
BOOST_STATIC_CONSTANT(int, value = 1);
static int const value = 1;
typedef arg<2> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -39,7 +39,7 @@ template<> struct arg<1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -47,7 +47,7 @@ template<> struct arg<1>
template<> struct arg<2>
{
BOOST_STATIC_CONSTANT(int, value = 2);
static int const value = 2;
typedef arg<3> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -60,7 +60,7 @@ template<> struct arg<2>
typedef U2 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -68,7 +68,7 @@ template<> struct arg<2>
template<> struct arg<3>
{
BOOST_STATIC_CONSTANT(int, value = 3);
static int const value = 3;
typedef arg<4> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -81,7 +81,7 @@ template<> struct arg<3>
typedef U3 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -89,7 +89,7 @@ template<> struct arg<3>
template<> struct arg<4>
{
BOOST_STATIC_CONSTANT(int, value = 4);
static int const value = 4;
typedef arg<5> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -102,7 +102,7 @@ template<> struct arg<4>
typedef U4 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -110,7 +110,7 @@ template<> struct arg<4>
template<> struct arg<5>
{
BOOST_STATIC_CONSTANT(int, value = 5);
static int const value = 5;
typedef arg<6> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -123,7 +123,7 @@ template<> struct arg<5>
typedef U5 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};

View File

@@ -57,7 +57,7 @@ template< typename F, typename T > struct bind2nd;
namespace aux {
template< int > struct bind_impl_chooser;
template< int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
@@ -74,11 +74,31 @@ aux::yes_tag is_bind_helper(arg<N>*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*);
template< typename T > struct is_bind_template
template< bool is_ref_ = true >
struct is_bind_template_impl
{
template< typename T > struct result_
{
static bool const value = false;
};
};
template<>
struct is_bind_template_impl<false>
{
template< typename T > struct result_
{
static bool const value =
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
;
};
};
template< typename T > struct is_bind_template
: is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
::template result_<T>
{
BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
);
};
} // namespace aux
@@ -401,13 +421,13 @@ namespace aux {
template< typename T >
struct is_bind_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
static bool const value = true;
};
template<>
struct is_bind_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
static bool const value = false;
};
template<
@@ -415,7 +435,11 @@ template<
>
struct bind_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_bind_arg<T1>::value + is_bind_arg<T2>::value + is_bind_arg<T3>::value + is_bind_arg<T4>::value + is_bind_arg<T5>::value);
static int const value =
is_bind_arg<T1>::value + is_bind_arg<T2>::value
+ is_bind_arg<T3>::value + is_bind_arg<T4>::value
+ is_bind_arg<T5>::value
;
};
}

View File

@@ -83,7 +83,7 @@ template< typename F, typename T > struct bind2nd;
namespace aux {
template< int > struct bind_impl_chooser;
template< int arity_ > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
@@ -100,11 +100,31 @@ aux::yes_tag is_bind_helper(arg<N>*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*);
template< typename T > struct is_bind_template
template< bool is_ref_ = true >
struct is_bind_template_impl
{
template< typename T > struct result_
{
static bool const value = false;
};
};
template<>
struct is_bind_template_impl<false>
{
template< typename T > struct result_
{
static bool const value =
sizeof(aux::is_bind_helper(static_cast<T*>(0))) ==
sizeof(aux::yes_tag)
;
};
};
template< typename T > struct is_bind_template
: is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
::template result_<T>
{
BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
);
};
} // namespace aux
@@ -505,13 +525,13 @@ namespace aux {
template< typename T >
struct is_bind_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
static bool const value = true;
};
template<>
struct is_bind_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
static bool const value = false;
};
template<
@@ -519,7 +539,11 @@ template<
>
struct bind_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_bind_arg<T1>::value + is_bind_arg<T2>::value + is_bind_arg<T3>::value + is_bind_arg<T4>::value + is_bind_arg<T5>::value);
static int const value =
is_bind_arg<T1>::value + is_bind_arg<T2>::value
+ is_bind_arg<T3>::value + is_bind_arg<T4>::value
+ is_bind_arg<T5>::value
;
};
}

View File

@@ -16,7 +16,7 @@ template<
>
struct fold_backward_impl;
template< long >
template< long N >
struct fold_backward_chunk;
template<>

View File

@@ -15,7 +15,7 @@ template<
>
struct fold_impl;
template< long >
template< long N >
struct fold_chunk;
template<>

View File

@@ -16,7 +16,7 @@ template<
>
struct iter_fold_backward_impl;
template< long >
template< long N >
struct iter_fold_backward_chunk;
template<>

View File

@@ -54,7 +54,7 @@ struct iter_fold_if_forward_step
{
typedef typename Predicate::template apply< State,Iterator >::type not_last;
typedef typename iter_fold_if_step_impl<
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
typedef typename impl_::state state;
@@ -71,7 +71,7 @@ struct iter_fold_if_backward_step
{
typedef typename Predicate::template apply< State,Iterator >::type not_last;
typedef typename iter_fold_if_step_impl<
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
typedef typename impl_::state state;

View File

@@ -15,7 +15,7 @@ template<
>
struct iter_fold_impl;
template< long >
template< long N >
struct iter_fold_chunk;
template<>

View File

@@ -12,7 +12,7 @@ struct lambda_helper1
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 1);
static int const arity = 1;
typedef T1 arg1;
template< typename U1 > struct apply
@@ -30,7 +30,7 @@ struct lambda_helper2
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 2);
static int const arity = 2;
typedef T1 arg1;
typedef T2 arg2;
@@ -49,7 +49,7 @@ struct lambda_helper3
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 3);
static int const arity = 3;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -69,7 +69,7 @@ struct lambda_helper4
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 4);
static int const arity = 4;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -97,7 +97,7 @@ struct lambda_helper5
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 5);
static int const arity = 5;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;

View File

@@ -6,7 +6,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
, Protect
::template result_<T>
>::template result_<T>
{
};

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct list_impl_chooser;
template< int N > struct list_impl_chooser;
}
namespace aux {
@@ -222,13 +222,13 @@ namespace aux {
template< typename T >
struct is_list_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
static bool const value = true;
};
template<>
struct is_list_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
static bool const value = false;
};
template<
@@ -237,7 +237,13 @@ template<
>
struct list_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_list_arg<T1>::value + is_list_arg<T2>::value + is_list_arg<T3>::value + is_list_arg<T4>::value + is_list_arg<T5>::value + is_list_arg<T6>::value + is_list_arg<T7>::value + is_list_arg<T8>::value + is_list_arg<T9>::value + is_list_arg<T10>::value);
static int const value =
is_list_arg<T1>::value + is_list_arg<T2>::value
+ is_list_arg<T3>::value + is_list_arg<T4>::value
+ is_list_arg<T5>::value + is_list_arg<T6>::value
+ is_list_arg<T7>::value + is_list_arg<T8>::value
+ is_list_arg<T9>::value + is_list_arg<T10>::value
;
};
template<
@@ -247,8 +253,9 @@ template<
struct list_impl
{
typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_;
typedef typename aux::list_impl_chooser< arg_num_::value >
::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
typedef typename aux::list_impl_chooser<
arg_num_::value
>::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
};
} // namespace aux

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct list_c_impl_chooser;
template< int N > struct list_c_impl_chooser;
}
namespace aux {
@@ -233,13 +233,13 @@ namespace aux {
template< long T >
struct is_list_c_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
static bool const value = true;
};
template<>
struct is_list_c_arg<LONG_MAX>
{
BOOST_STATIC_CONSTANT(bool, value = false);
static bool const value = false;
};
template<
@@ -248,7 +248,13 @@ template<
>
struct list_c_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_list_c_arg<T1>::value + is_list_c_arg<T2>::value + is_list_c_arg<T3>::value + is_list_c_arg<T4>::value + is_list_c_arg<T5>::value + is_list_c_arg<T6>::value + is_list_c_arg<T7>::value + is_list_c_arg<T8>::value + is_list_c_arg<T9>::value + is_list_c_arg<T10>::value);
static int const value =
is_list_c_arg<T1>::value + is_list_c_arg<T2>::value
+ is_list_c_arg<T3>::value + is_list_c_arg<T4>::value
+ is_list_c_arg<T5>::value + is_list_c_arg<T6>::value
+ is_list_c_arg<T7>::value + is_list_c_arg<T8>::value
+ is_list_c_arg<T9>::value + is_list_c_arg<T10>::value
;
};
template<

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct vector_impl_chooser;
template< int N > struct vector_impl_chooser;
}
namespace aux {
@@ -222,13 +222,13 @@ namespace aux {
template< typename T >
struct is_vector_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
static bool const value = true;
};
template<>
struct is_vector_arg<void_>
{
BOOST_STATIC_CONSTANT(bool, value = false);
static bool const value = false;
};
template<
@@ -237,7 +237,13 @@ template<
>
struct vector_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_vector_arg<T1>::value + is_vector_arg<T2>::value + is_vector_arg<T3>::value + is_vector_arg<T4>::value + is_vector_arg<T5>::value + is_vector_arg<T6>::value + is_vector_arg<T7>::value + is_vector_arg<T8>::value + is_vector_arg<T9>::value + is_vector_arg<T10>::value);
static int const value =
is_vector_arg<T1>::value + is_vector_arg<T2>::value
+ is_vector_arg<T3>::value + is_vector_arg<T4>::value
+ is_vector_arg<T5>::value + is_vector_arg<T6>::value
+ is_vector_arg<T7>::value + is_vector_arg<T8>::value
+ is_vector_arg<T9>::value + is_vector_arg<T10>::value
;
};
template<

View File

@@ -5,7 +5,7 @@ namespace boost {
namespace mpl {
namespace aux {
template< int > struct vector_c_impl_chooser;
template< int N > struct vector_c_impl_chooser;
}
namespace aux {
@@ -233,13 +233,13 @@ namespace aux {
template< long T >
struct is_vector_c_arg
{
BOOST_STATIC_CONSTANT(bool, value = true);
static bool const value = true;
};
template<>
struct is_vector_c_arg<LONG_MAX>
{
BOOST_STATIC_CONSTANT(bool, value = false);
static bool const value = false;
};
template<
@@ -248,7 +248,13 @@ template<
>
struct vector_c_count_args
{
BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value + is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value + is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value + is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value + is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value);
static int const value =
is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value
+ is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value
+ is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value
+ is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value
+ is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value
;
};
template<

View File

@@ -6,7 +6,7 @@ namespace mpl {
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
static int const value = -1;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
template<
@@ -18,7 +18,7 @@ template<> struct arg<-1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -26,7 +26,7 @@ template<> struct arg<-1>
template<> struct arg<1>
{
BOOST_STATIC_CONSTANT(int, value = 1);
static int const value = 1;
typedef arg<2> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -39,7 +39,7 @@ template<> struct arg<1>
typedef U1 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -47,7 +47,7 @@ template<> struct arg<1>
template<> struct arg<2>
{
BOOST_STATIC_CONSTANT(int, value = 2);
static int const value = 2;
typedef arg<3> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -60,7 +60,7 @@ template<> struct arg<2>
typedef U2 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -68,7 +68,7 @@ template<> struct arg<2>
template<> struct arg<3>
{
BOOST_STATIC_CONSTANT(int, value = 3);
static int const value = 3;
typedef arg<4> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -81,7 +81,7 @@ template<> struct arg<3>
typedef U3 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -89,7 +89,7 @@ template<> struct arg<3>
template<> struct arg<4>
{
BOOST_STATIC_CONSTANT(int, value = 4);
static int const value = 4;
typedef arg<5> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -102,7 +102,7 @@ template<> struct arg<4>
typedef U4 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};
@@ -110,7 +110,7 @@ template<> struct arg<4>
template<> struct arg<5>
{
BOOST_STATIC_CONSTANT(int, value = 5);
static int const value = 5;
typedef arg<6> next;
BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
@@ -123,7 +123,7 @@ template<> struct arg<5>
typedef U5 type;
private:
BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value);
static bool const nv = !is_void_<type>::value;
BOOST_STATIC_ASSERT(nv);
};

View File

@@ -54,7 +54,7 @@ struct iter_fold_if_forward_step
{
typedef typename Predicate::template apply< State,Iterator >::type not_last;
typedef typename iter_fold_if_step_impl<
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
typedef typename impl_::state state;
@@ -71,7 +71,7 @@ struct iter_fold_if_backward_step
{
typedef typename Predicate::template apply< State,Iterator >::type not_last;
typedef typename iter_fold_if_step_impl<
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
typedef typename impl_::state state;

View File

@@ -12,7 +12,7 @@ struct lambda_helper1
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 1);
static int const arity = 1;
typedef T1 arg1;
template< typename U1 > struct apply
@@ -30,7 +30,7 @@ struct lambda_helper2
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 2);
static int const arity = 2;
typedef T1 arg1;
typedef T2 arg2;
@@ -49,7 +49,7 @@ struct lambda_helper3
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 3);
static int const arity = 3;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -69,7 +69,7 @@ struct lambda_helper4
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 4);
static int const arity = 4;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;
@@ -97,7 +97,7 @@ struct lambda_helper5
{
struct rebind
{
BOOST_STATIC_CONSTANT(int, arity = 5);
static int const arity = 5;
typedef T1 arg1;
typedef T2 arg2;
typedef T3 arg3;

View File

@@ -6,7 +6,7 @@ namespace mpl {
namespace aux {
template< int arity, bool Protect > struct lambda_impl
template< int arity_, bool Protect > struct lambda_impl
{
template< typename T > struct result_
{
@@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true>
template< typename T, bool Protect = true >
struct lambda
: aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
, Protect
::template result_<T>
>::template result_<T>
{
};

View File

@@ -25,6 +25,7 @@
#include "boost/mpl/aux_/iterator_names.hpp"
#include "boost/mpl/aux_/lambda_spec.hpp"
#include "boost/mpl/aux_/config/ctps.hpp"
#include "boost/mpl/aux_/config/nttp.hpp"
namespace boost { namespace mpl {
@@ -34,7 +35,7 @@ template< typename T, int N >
struct single_element_iter;
// random access support
template< typename T, int N >
template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, N) >
struct single_iter_base
{
typedef ra_iter_tag_ category;
@@ -79,7 +80,7 @@ struct single_element_iter<T,1>
#else
template< int N > struct single_iter_impl
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct single_iter_impl
{
template< typename T > struct result_;
};
@@ -105,7 +106,7 @@ struct single_iter_impl<1>
};
};
template< typename T, int N >
template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, N) >
struct single_element_iter
: single_iter_impl<N>::template result_<T>
{

View File

@@ -0,0 +1,126 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/transform_iter.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED
#define BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED
#include "boost/mpl/apply.hpp"
#include "boost/mpl/aux_/lambda_spec.hpp"
#include "boost/mpl/aux_/config/ctps.hpp"
#include "boost/type_traits/is_same.hpp"
namespace boost {
namespace mpl {
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename Iterator
, typename LastIterator
, typename F
>
struct transform_iter
{
typedef Iterator base;
typedef typename base::category category;
typedef transform_iter< typename base::next,LastIterator,F > next;
typedef typename apply1<
F
, typename base::type
>::type type;
};
template<
typename LastIterator
, typename F
>
struct transform_iter< LastIterator,LastIterator,F >
{
typedef LastIterator base;
typedef typename base::category category;
};
#else
template<
typename Iterator
, typename LastIterator
, typename F
>
struct transform_iter;
template< bool >
struct transform_iter_impl
{
template<
typename Iterator
, typename LastIterator
, typename F
>
struct result_
{
typedef Iterator base;
// agurt, 14/oct/02: have to use |Iterator| instead of |base| below
// to prevent |base| and |mpl::base| conflict on MSVC 6.0
typedef typename Iterator::category category;
typedef transform_iter< typename Iterator::next,LastIterator,F > next;
typedef typename apply1<
F
, typename Iterator::type
>::type type;
};
};
template<>
struct transform_iter_impl<true>
{
template<
typename Iterator
, typename LastIterator
, typename F
>
struct result_
{
typedef Iterator base;
typedef typename Iterator::category category;
};
};
template<
typename Iterator
, typename LastIterator
, typename F
>
struct transform_iter
: transform_iter_impl<
::boost::is_same<Iterator,LastIterator>::value
>::template result_< Iterator,LastIterator,F >
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace aux
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::transform_iter)
} // namespace mpl
} // namespace boost
#endif // BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED

View File

@@ -25,6 +25,7 @@
# define BOOST_MPL_AUX_TYPEOF(T,x) __typeof__(x)
#else
# include "boost/config.hpp"
# include "boost/mpl/aux_/config/nttp.hpp"
namespace boost {
namespace mpl {
@@ -33,8 +34,8 @@ namespace mpl {
// by Bill Gibbons, C++ User Journal, November 2000
namespace aux {
template< long N > struct typeof_answer { typedef char type[N]; };
template< long > struct typeof_c;
template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct typeof_answer { typedef char type[N]; };
template< BOOST_MPL_AUX_NTTP_DECL(long, S) > struct typeof_c;
}
#define BOOST_MPL_AUX_REGISTER_TYPE(index, T) \

View File

@@ -17,9 +17,12 @@
#ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
#define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
#include "boost/config.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(BOOST_MPL_MSVC_ETI_BUG)
# include "boost/mpl/int_c.hpp"
namespace boost { namespace mpl { namespace aux {
@@ -29,14 +32,29 @@ struct value_wknd
{
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
template<>
struct value_wknd<int>
: int_c<0>
{
};
#endif
}}} // namespace boost::mpl::aux
# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C >
# if !defined(BOOST_MPL_MSVC_ETI_BUG)
# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C >
# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C)
# else
# define BOOST_MPL_AUX_VALUE_WKND(C) C
# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C >
# endif
#else
# define BOOST_MPL_AUX_VALUE_WKND(C) C
# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C
#endif // __BORLANDC__
#endif // __BORLANDC__ || BOOST_MPL_MSVC_ETI_BUG
#endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED

View File

@@ -26,7 +26,7 @@
#include "boost/mpl/aux_/template_arity_fwd.hpp"
#include "boost/mpl/aux_/lambda_arity_param.hpp"
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/mpl/aux_/config/ntp.hpp"
#include "boost/mpl/aux_/config/nttp.hpp"
#include "boost/mpl/aux_/config/ttp.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#include "boost/mpl/aux_/config/overload_resolution.hpp"
@@ -40,7 +40,7 @@
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \
namespace aux { \
template< BOOST_MPL_AUX_NTP_DECL(int, N) > \
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \
struct arity< \
name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \
, N \

View File

@@ -0,0 +1,48 @@
//-----------------------------------------------------------------------------
// boost mpl/base.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_BASE_HPP_INCLUDED
#define BOOST_MPL_BASE_HPP_INCLUDED
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
namespace boost {
namespace mpl {
template<
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T)
>
struct base
{
typedef typename T::base type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,base,(T))
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
template<> struct base<int>
{
typedef int type;
};
#endif
BOOST_MPL_AUX_VOID_SPEC(1, base)
} // namespace mpl
} // namespace boost
#endif // BOOST_MPL_BASE_HPP_INCLUDED

View File

@@ -24,11 +24,8 @@
#include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/config/bind.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/is_reference.hpp"
#endif
#include "boost/mpl/aux_/config/ctps.hpp"
#include "boost/mpl/aux_/config/static_constant.hpp"
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/placeholder.hpp"
@@ -38,7 +35,9 @@
# include "boost/mpl/aux_/arity_spec.hpp"
# include "boost/mpl/aux_/type_wrapper.hpp"
# include "boost/mpl/aux_/yes_no.hpp"
# include "boost/type_traits/same_traits.hpp"
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# include "boost/type_traits/is_reference.hpp"
# endif
#endif
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
@@ -58,16 +57,16 @@
# include "boost/mpl/aux_/preprocessor/params.hpp"
# include "boost/mpl/aux_/preprocessor/default_params.hpp"
# include "boost/mpl/aux_/preprocessor/def_params_tail.hpp"
# include "boost/mpl/aux_/preprocessor/partial_spec_params.hpp"
# include "boost/mpl/aux_/preprocessor/enum.hpp"
# include "boost/mpl/aux_/preprocessor/add.hpp"
# include "boost/mpl/aux_/preprocessor/sub.hpp"
# include "boost/mpl/aux_/config/dtp.hpp"
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/comma_if.hpp"
# include "boost/preprocessor/cat.hpp"
# include "boost/preprocessor/inc.hpp"
# include "boost/config.hpp"
namespace boost {
namespace mpl {
@@ -98,12 +97,8 @@ namespace mpl {
/**/
# define AUX_BIND_N_SPEC_PARAMS(n, param, def) \
BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \
BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n)) \
BOOST_MPL_PP_ENUM( \
BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n) \
, def \
) \
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \
/**/
#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
@@ -239,7 +234,7 @@ namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
int N, AUX_BIND_PARAMS(typename U)
BOOST_MPL_AUX_NTTP_DECL(int, N), AUX_BIND_PARAMS(typename U)
>
struct resolve_bind_arg< arg<N>,AUX_BIND_PARAMS(U) >
{
@@ -278,7 +273,7 @@ struct resolve_bind_arg< bind2nd<F,T>, AUX_BIND_PARAMS(U) >
#else
// agurt, 10/mar/02: the forward declaration has to appear before any of
// 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it
template< int > struct bind_impl_chooser;
template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_impl_chooser;
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
@@ -294,37 +289,36 @@ template<
aux::yes_tag is_bind_helper(bind<F,AUX_BIND_PARAMS(T)>*);
#endif
template< int N >
template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
aux::yes_tag is_bind_helper(arg<N>*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st<F,T>*);
template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd<F,T>*);
template < bool ref = true >
template< bool is_ref_ = true >
struct is_bind_template_impl
{
template < typename T >
struct apply
template< typename T > struct result_
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
};
template <>
template<>
struct is_bind_template_impl<false>
{
template< typename T >
struct apply
template< typename T > struct result_
{
BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
BOOST_STATIC_CONSTANT(bool, value =
sizeof(aux::is_bind_helper(static_cast<T*>(0)))
== sizeof(aux::yes_tag)
);
};
};
template< typename T > struct is_bind_template
: is_bind_template_impl<boost::detail::is_reference_impl< T >::value>
::template apply< T >
: is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
::template result_<T>
{
};

View File

@@ -17,7 +17,7 @@
#ifndef BOOST_MPL_BOOL_C_HPP_INCLUDED
#define BOOST_MPL_BOOL_C_HPP_INCLUDED
#include "boost/config.hpp"
#include "boost/mpl/aux_/config/static_constant.hpp"
namespace boost {
namespace mpl {
@@ -34,6 +34,12 @@ template< bool C > struct bool_c
typedef bool_c<true> true_c;
typedef bool_c<false> false_c;
namespace v2_1 {
using mpl::bool_c;
using mpl::true_c;
using mpl::false_c;
}
} // namespace mpl
} // namespace boost

View File

@@ -17,6 +17,7 @@
#define BOOST_MPL_IF_HPP_INCLUDED
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/ice_cast.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
@@ -53,7 +54,7 @@ template<
struct if_
{
typedef typename if_c<
BOOST_MPL_AUX_VALUE_WKND(C)::value
BOOST_MPL_AUX_ICE_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(C)::value)
, T1
, T2
>::type type;
@@ -98,7 +99,7 @@ struct if_
enum { c_ = C::value };
public:
typedef typename answer<c_>::type type;
typedef typename answer< BOOST_MPL_AUX_ICE_CAST(bool, c_) >::type type;
};
#else
@@ -147,7 +148,7 @@ template<
>
struct if_
{
typedef typename aux::if_impl< C::value >
typedef typename aux::if_impl< BOOST_MPL_AUX_ICE_CAST(bool, C::value) >
::template result_<T1,T2>::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C,T1,T2))

View File

@@ -17,12 +17,13 @@
#ifndef BOOST_MPL_INT_C_HPP_INCLUDED
#define BOOST_MPL_INT_C_HPP_INCLUDED
#include "boost/config.hpp"
#include "boost/mpl/aux_/config/nttp.hpp"
#include "boost/mpl/aux_/config/static_constant.hpp"
namespace boost {
namespace mpl {
template< int N >
template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
struct int_c
{
BOOST_STATIC_CONSTANT(int, value = N);

Some files were not shown because too many files have changed in this diff Show More