Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

Process #ifndef...#else...#endif blocks.

[SVN r86245]
This commit is contained in:
Stephen Kelly
2013-10-11 23:17:48 +00:00
parent 2a61f750a9
commit d6d7e5abe0
27 changed files with 0 additions and 1138 deletions

View File

@@ -134,7 +134,6 @@ struct BOOST_PP_CAT(apply,i_)
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY
/// primary template (not a specialization!)
@@ -155,27 +154,6 @@ struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) >
};
#endif
# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace aux {
template<>
struct apply_chooser<i_>
{
template<
typename F, AUX778076_APPLY_PARAMS(typename T)
>
struct result_
{
typedef BOOST_PP_CAT(apply,i_)<
F AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
> type;
};
};
} // namespace aux
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# undef i_

View File

@@ -57,17 +57,11 @@ namespace boost { namespace mpl {
BOOST_MPL_PP_PARAMS(n, param) \
/**/
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
// forward declaration
template<
typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
>
struct apply;
#else
namespace aux {
template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser;
}
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_fwd.hpp>))

View File

@@ -48,7 +48,6 @@ struct next_filter_iter
typedef filter_iter<base_iter_,LastIterator,Predicate> type;
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename Iterator
@@ -78,58 +77,6 @@ struct filter_iter< LastIterator,LastIterator,Predicate >
typedef forward_iterator_tag category;
};
#else
template< bool >
struct filter_iter_impl
{
template<
typename Iterator
, typename LastIterator
, typename Predicate
>
struct result_
{
typedef Iterator base;
typedef forward_iterator_tag category;
typedef typename next_filter_iter<
typename mpl::next<Iterator>::type
, LastIterator
, Predicate
>::type next;
typedef typename deref<base>::type type;
};
};
template<>
struct filter_iter_impl< true >
{
template<
typename Iterator
, typename LastIterator
, typename Predicate
>
struct result_
{
typedef Iterator base;
typedef forward_iterator_tag category;
};
};
template<
typename Iterator
, typename LastIterator
, typename Predicate
>
struct filter_iter
: filter_iter_impl<
::boost::is_same<Iterator,LastIterator>::value
>::template result_< Iterator,LastIterator,Predicate >
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace aux

View File

@@ -56,7 +56,6 @@ template<
>
struct AUX778076_FOLD_IMPL_NAME;
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
@@ -164,124 +163,6 @@ struct AUX778076_FOLD_IMPL_NAME<N,Last,Last,State,ForwardOp >
# endif // BOOST_WORKAROUND(__BORLANDC__, < 0x600)
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template< int N >
struct AUX778076_FOLD_CHUNK_NAME;
# define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/fold_impl_body.hpp>))
# include BOOST_PP_ITERATE()
// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
template< int N >
struct AUX778076_FOLD_CHUNK_NAME
{
template<
typename First
, typename Last
, typename State
, typename ForwardOp
>
struct result_
{
typedef AUX778076_FOLD_IMPL_NAME<
BOOST_MPL_LIMIT_UNROLLING
, First
, Last
, State
, ForwardOp
> chunk_;
typedef AUX778076_FOLD_IMPL_NAME<
( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
, typename chunk_::iterator
, Last
, typename chunk_::state
, ForwardOp
> res_;
typedef typename res_::state state;
typedef typename res_::iterator iterator;
};
};
// fallback implementation for sequences of unknown size
template<
typename First
, typename Last
, typename State
, typename ForwardOp
>
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step);
template<
typename Last
, typename State
>
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)
{
typedef Last iterator;
typedef State state;
};
template<>
struct AUX778076_FOLD_CHUNK_NAME<-1>
{
template<
typename First
, typename Last
, typename State
, typename ForwardOp
>
struct result_
{
typedef typename if_<
typename is_same<First,Last>::type
, BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State>
, BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,ForwardOp>
>::type res_;
typedef typename res_::state state;
typedef typename res_::iterator iterator;
};
};
template<
typename First
, typename Last
, typename State
, typename ForwardOp
>
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)
{
// can't inherit here - it breaks MSVC 7.0
typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_<
typename mpl::next<First>::type
, Last
, typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
, ForwardOp
> chunk_;
typedef typename chunk_::state state;
typedef typename chunk_::iterator iterator;
};
template<
int N
, typename First
, typename Last
, typename State
, typename ForwardOp
>
struct AUX778076_FOLD_IMPL_NAME
: AUX778076_FOLD_CHUNK_NAME<N>
::template result_<First,Last,State,ForwardOp>
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}}}
@@ -298,7 +179,6 @@ struct AUX778076_FOLD_IMPL_NAME
# define n_ BOOST_PP_FRAME_ITERATION(1)
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename First
@@ -317,30 +197,6 @@ struct AUX778076_FOLD_IMPL_NAME<n_,First,Last,State,ForwardOp>
typedef BOOST_PP_CAT(iter,n_) iterator;
};
#else
template<> struct AUX778076_FOLD_CHUNK_NAME<n_>
{
template<
typename First
, typename Last
, typename State
, typename ForwardOp
>
struct result_
{
typedef First iter0;
typedef State state0;
BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused)
typedef BOOST_PP_CAT(state,n_) state;
typedef BOOST_PP_CAT(iter,n_) iterator;
};
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# undef n_

View File

@@ -33,7 +33,6 @@
#include <boost/preprocessor/arithmetic/dec.hpp>
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \
BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
@@ -90,70 +89,5 @@ BOOST_MPL_AUX_NA_SPEC(arity, name) \
BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \
/**/
#else
# define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \
BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
template< \
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
> \
struct def_##name##_impl \
: if_< has_push_back<P1> \
, aux::name##_impl< \
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
, back_inserter< typename clear<P1>::type > \
> \
, aux::reverse_##name##_impl< \
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
, front_inserter< typename clear<P1>::type > \
> \
>::type \
{ \
}; \
\
template< \
BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
> \
struct name \
{ \
typedef typename eval_if< \
is_na<BOOST_PP_CAT(P, arity)> \
, def_##name##_impl<BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P)> \
, aux::name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
>::type type; \
}; \
\
template< \
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
> \
struct def_reverse_##name##_impl \
: if_< has_push_back<P1> \
, aux::reverse_##name##_impl< \
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
, back_inserter< typename clear<P1>::type > \
> \
, aux::name##_impl< \
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
, front_inserter< typename clear<P1>::type > \
> \
>::type \
{ \
}; \
template< \
BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
> \
struct reverse_##name \
{ \
typedef typename eval_if< \
is_na<BOOST_PP_CAT(P, arity)> \
, def_reverse_##name##_impl<BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P)> \
, aux::reverse_##name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
>::type type; \
}; \
BOOST_MPL_AUX_NA_SPEC(arity, name) \
BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \
/**/
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#endif // BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED

View File

@@ -23,7 +23,6 @@
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename Iterator1
@@ -66,49 +65,6 @@ struct next< joint_iter<L1,L1,I2> >
typedef joint_iter< L1,L1,typename mpl::next<I2>::type > type;
};
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template<
typename Iterator1
, typename LastIterator1
, typename Iterator2
>
struct joint_iter;
template< bool > struct joint_iter_impl
{
template< typename I1, typename L1, typename I2 > struct result_
{
typedef I1 base;
typedef forward_iterator_tag category;
typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > next;
typedef typename deref<I1>::type type;
};
};
template<> struct joint_iter_impl<true>
{
template< typename I1, typename L1, typename I2 > struct result_
{
typedef I2 base;
typedef forward_iterator_tag category;
typedef joint_iter< L1,L1,typename mpl::next<I2>::type > next;
typedef typename deref<I2>::type type;
};
};
template<
typename Iterator1
, typename LastIterator1
, typename Iterator2
>
struct joint_iter
: joint_iter_impl< is_same<Iterator1,LastIterator1>::value >
::template result_<Iterator1,LastIterator1,Iterator2>
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, joint_iter)

View File

@@ -58,7 +58,6 @@ namespace boost { namespace mpl {
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< bool C_, AUX778076_PARAMS(typename T, 1) >
struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)
@@ -85,34 +84,6 @@ struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
{
};
#else
template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)
{
template< AUX778076_PARAMS(typename T, 1) > struct result_
: BOOST_PP_CAT(AUX778076_OP_VALUE1,_)
{
};
};
template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
{
template< AUX778076_PARAMS(typename T, 1) > struct result_
: BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
>::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) >
{
};
};
template<>
struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) >
: BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace aux
@@ -122,16 +93,10 @@ template<
BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_))
>
struct AUX778076_OP_NAME
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
: aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
, AUX778076_SHIFTED_PARAMS(T,0)
>
#else
: aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
>::template result_< AUX778076_SHIFTED_PARAMS(T,0) >
#endif
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
BOOST_MPL_LIMIT_METAFUNCTION_ARITY

View File

@@ -45,7 +45,6 @@ struct is_not_na<na>
{
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename T, typename U > struct if_na
{
typedef T type;
@@ -55,28 +54,6 @@ template< typename U > struct if_na<na,U>
{
typedef U type;
};
#else
template< typename T > struct if_na_impl
{
template< typename U > struct apply
{
typedef T type;
};
};
template<> struct if_na_impl<na>
{
template< typename U > struct apply
{
typedef U type;
};
};
template< typename T, typename U > struct if_na
: if_na_impl<T>::template apply<U>
{
};
#endif
}}

View File

@@ -92,7 +92,6 @@ template<> struct AUX778076_OP_IMPL_NAME<na,na>
};
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Tag > struct AUX778076_OP_IMPL_NAME<na,Tag>
{
template< typename U1, typename U2 > struct apply
@@ -110,25 +109,6 @@ template< typename Tag > struct AUX778076_OP_IMPL_NAME<Tag,na>
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
#else
template<> struct AUX778076_OP_IMPL_NAME<na,integral_c_tag>
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template<> struct AUX778076_OP_IMPL_NAME<integral_c_tag,na>
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
#endif
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
@@ -147,7 +127,6 @@ template< typename T > struct AUX778076_OP_TAG_NAME
#if AUX778076_OP_ARITY != 2
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , BOOST_PP_CAT(N, BOOST_MPL_PP_ADD(i, 2))>
# define AUX778076_OP_N_CALLS(i, N) \
@@ -177,44 +156,6 @@ struct AUX778076_OP_NAME
# undef AUX778076_OP_N_CALLS
# undef AUX778076_OP_RIGHT_OPERAND
# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
/// forward declaration
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
>
struct BOOST_PP_CAT(AUX778076_OP_NAME,2);
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na)
>
struct AUX778076_OP_NAME
: if_<
is_na<N3>
, BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
, AUX778076_OP_NAME<
BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
, BOOST_MPL_PP_EXT_PARAMS(3, BOOST_PP_INC(AUX778076_OP_ARITY), N)
>
>::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
AUX778076_OP_ARITY
, AUX778076_OP_NAME
, ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) )
)
};
template<
typename N1
, typename N2
>
struct BOOST_PP_CAT(AUX778076_OP_NAME,2)
#endif
#else // AUX778076_OP_ARITY == 2
@@ -233,15 +174,11 @@ struct AUX778076_OP_NAME
{
#if AUX778076_OP_ARITY != 2
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
AUX778076_OP_ARITY
, AUX778076_OP_NAME
, ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) )
)
# else
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, BOOST_PP_CAT(AUX778076_OP_NAME,2), (N1, N2))
# endif
#else
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2))

View File

@@ -145,18 +145,11 @@ namespace boost { namespace mpl {
#endif // AUX778076_SEQUENCE_INTEGRAL_WRAPPER
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
// forward declaration
template<
AUX778076_SEQUENCE_DEFAULT_PARAMS()
>
struct AUX778076_SEQUENCE_NAME;
#else
namespace aux {
template< int N >
struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser);
}
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, AUX778076_SEQUENCE_LIMIT, <boost/mpl/aux_/sequence_wrapper.hpp>))
@@ -187,7 +180,6 @@ struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser);
#else
#define i_ BOOST_PP_FRAME_ITERATION(1)
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if i_ == AUX778076_SEQUENCE_LIMIT
@@ -218,33 +210,6 @@ struct AUX778076_SEQUENCE_NAME< AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(i_) >
#endif // i_ == AUX778076_SEQUENCE_LIMIT
# else
namespace aux {
template<>
struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser)<i_>
{
template<
AUX778076_SEQUENCE_PARAMS()
>
struct result_
{
#if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER)
typedef typename AUX778076_SEQUENCE_NAME_N(i_)<
AUX778076_SEQUENCE_N_ARGS(i_)
>::type type;
#else
typedef AUX778076_SEQUENCE_NAME_N(i_)<
AUX778076_SEQUENCE_N_ARGS(i_)
>::type type;
#endif
};
};
} // namespace aux
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#undef i_
#endif // BOOST_PP_IS_ITERATING

View File

@@ -25,7 +25,6 @@
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
namespace aux {
@@ -68,49 +67,6 @@ struct distance< aux::sel_iter<T,l1>, aux::sel_iter<T,l2> >
{
};
#else
namespace aux {
struct sel_iter_tag;
template< typename T, int is_last_ >
struct sel_iter
{
enum { pos_ = is_last_ };
typedef aux::sel_iter_tag tag;
typedef random_access_iterator_tag category;
typedef sel_iter<T,(is_last_ + 1)> next;
typedef sel_iter<T,(is_last_ - 1)> prior;
typedef T type;
};
} // namespace aux
template<> struct advance_impl<aux::sel_iter_tag>
{
template< typename Iterator, typename N > struct apply
{
enum { pos_ = Iterator::pos_, n_ = N::value };
typedef aux::sel_iter<
typename Iterator::type
, (pos_ + n_)
> type;
};
};
template<> struct distance_impl<aux::sel_iter_tag>
{
template< typename Iter1, typename Iter2 > struct apply
{
enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ };
typedef int_<( pos2_ - pos1_ )> type;
BOOST_STATIC_CONSTANT(int, value = ( pos2_ - pos1_ ));
};
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}}

View File

@@ -26,7 +26,6 @@ namespace boost { namespace mpl {
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename Iterator
@@ -55,64 +54,6 @@ struct transform_iter< LastIterator,LastIterator,F >
typedef forward_iterator_tag 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;
typedef forward_iterator_tag category;
typedef transform_iter< typename mpl::next<Iterator>::type,LastIterator,F > next;
typedef typename apply1<
F
, typename deref<Iterator>::type
>::type type;
};
};
template<>
struct transform_iter_impl<true>
{
template<
typename Iterator
, typename LastIterator
, typename F
>
struct result_
{
typedef Iterator base;
typedef forward_iterator_tag 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

View File

@@ -24,7 +24,6 @@ template< typename T > struct type_wrapper
typedef T type;
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
// agurt 08/may/03: a complicated way to extract the wrapped type; need it
// mostly for the sake of GCC (3.2.x), which ICEs if you try to extract the
// nested 'type' from 'type_wrapper<T>' when the latter was the result of a
@@ -35,12 +34,6 @@ template< typename T > struct wrapped_type< type_wrapper<T> >
{
typedef T type;
};
#else
template< typename W > struct wrapped_type
{
typedef typename W::type type;
};
#endif
}}}

View File

@@ -115,7 +115,6 @@ namespace boost { namespace mpl {
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename T, AUX778076_BIND_PARAMS(typename U)
@@ -167,123 +166,6 @@ struct resolve_bind_arg< bind<F,AUX778076_BIND_PARAMS(T)>,AUX778076_BIND_PARAMS(
};
#endif
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// agurt, 15/jan/02: it's not a intended to be used as a function class, and
// MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't
// work), so I went with the 'result_' here, and in all other similar cases
template< bool >
struct resolve_arg_impl
{
template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_
{
typedef T type;
};
};
template<>
struct resolve_arg_impl<true>
{
template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_
{
typedef typename AUX778076_APPLY<
T
, AUX778076_BIND_PARAMS(U)
>::type type;
};
};
// for 'resolve_bind_arg'
template< typename T > struct is_bind_template;
template<
typename T, AUX778076_BIND_PARAMS(typename U)
>
struct resolve_bind_arg
: resolve_arg_impl< is_bind_template<T>::value >
::template result_< T,AUX778076_BIND_PARAMS(U) >
{
};
# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT)
template< typename T >
struct replace_unnamed_arg_impl
{
template< typename Arg > struct result_
{
typedef Arg next;
typedef T type;
};
};
template<>
struct replace_unnamed_arg_impl< arg<-1> >
{
template< typename Arg > struct result_
{
typedef typename next<Arg>::type next;
typedef Arg type;
};
};
template< typename T, typename Arg >
struct replace_unnamed_arg
: replace_unnamed_arg_impl<T>::template result_<Arg>
{
};
# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT
// 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 arity_ > struct bind_chooser;
aux::no_tag is_bind_helper(...);
template< typename T > aux::no_tag is_bind_helper(protect<T>*);
// overload for "main" form
// agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload
// in case if we use 'aux::type_wrapper< bind<...> >' here, and all
// 'bind' instantiations form a complete type anyway
#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE)
template<
typename F, AUX778076_BIND_PARAMS(typename T)
>
aux::yes_tag is_bind_helper(bind<F,AUX778076_BIND_PARAMS(T)>*);
#endif
template< int N >
aux::yes_tag is_bind_helper(arg<N>*);
template< bool is_ref_ = true >
struct is_bind_template_impl
{
template< typename T > struct result_
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
};
template<>
struct is_bind_template_impl<false>
{
template< typename T > struct result_
{
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 result_<T>
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace aux
@@ -450,7 +332,6 @@ struct BOOST_PP_CAT(bind,i_)
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U)
@@ -463,15 +344,6 @@ struct resolve_bind_arg<
typedef typename AUX778076_APPLY<f_, AUX778076_BIND_PARAMS(U)>::type type;
};
#else
template<
typename F AUX778076_BIND_N_PARAMS(i_, typename T)
>
aux::yes_tag
is_bind_helper(BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)>*);
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace aux
@@ -479,7 +351,6 @@ BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_))
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_))
# if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE)
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY
/// primary template (not a specialization!)
@@ -500,25 +371,6 @@ struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) >
};
#endif
# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace aux {
template<>
struct bind_chooser<i_>
{
template<
typename F, AUX778076_BIND_PARAMS(typename T)
>
struct result_
{
typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type;
};
};
} // namespace aux
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE
#endif // AUX778076_SPEC_NAME

View File

@@ -24,7 +24,6 @@
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
bool C
@@ -72,61 +71,6 @@ struct if_
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3))
};
#else
// no partial class template specialization
namespace aux {
template< bool C >
struct if_impl
{
template< typename T1, typename T2 > struct result_
{
typedef T1 type;
};
};
template<>
struct if_impl<false>
{
template< typename T1, typename T2 > struct result_
{
typedef T2 type;
};
};
} // namespace aux
template<
bool C_
, typename T1
, typename T2
>
struct if_c
{
typedef typename aux::if_impl< C_ >
::template result_<T1,T2>::type type;
};
// (almost) copy & paste in order to save one more
// recursively nested template instantiation to user
template<
typename BOOST_MPL_AUX_NA_PARAM(C_)
, typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
>
struct if_
{
enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value };
typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) >
::template result_<T1,T2>::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2))
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_MPL_AUX_NA_SPEC(3, if_)

View File

@@ -60,7 +60,6 @@ namespace boost { namespace mpl {
// inherit<her,empty_base,my>::type == struct unspecified : her, my {};
// inherit<empty_base,empty_base>::type == empty_base
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
@@ -96,66 +95,6 @@ struct inherit2<empty_base,empty_base>
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base,empty_base))
};
#else
namespace aux {
template< bool C1, bool C2 >
struct inherit2_impl
{
template< typename Derived, typename T1, typename T2 > struct result_
: T1, T2
{
typedef Derived type_;
};
};
template<>
struct inherit2_impl<false,true>
{
template< typename Derived, typename T1, typename T2 > struct result_
: T1
{
typedef T1 type_;
};
};
template<>
struct inherit2_impl<true,false>
{
template< typename Derived, typename T1, typename T2 > struct result_
: T2
{
typedef T2 type_;
};
};
template<>
struct inherit2_impl<true,true>
{
template< typename Derived, typename T1, typename T2 > struct result_
{
typedef T1 type_;
};
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
>
struct inherit2
: aux::inherit2_impl<
is_empty_base<T1>::value
, is_empty_base<T2>::value
>::template result_< inherit2<T1,T2>,T1,T2 >
{
typedef typename inherit2::type_ type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1,T2))
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_MPL_AUX_NA_SPEC(2, inherit2)

View File

@@ -23,7 +23,6 @@
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename T >
struct is_placeholder
@@ -37,29 +36,6 @@ struct is_placeholder< arg<N> >
{
};
#else
namespace aux {
aux::no_tag is_placeholder_helper(...);
template< int N >
aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg<N> >*);
} // namespace aux
template< typename T >
struct is_placeholder
{
static aux::type_wrapper<T>* get();
BOOST_STATIC_CONSTANT(bool, value =
sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag)
);
typedef bool_<value> type;
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}}

View File

@@ -24,7 +24,6 @@
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Node >
struct l_iter
@@ -45,18 +44,6 @@ struct next< l_iter<Node> >
typedef l_iter< typename Node::next > type;
};
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template< typename Node >
struct l_iter
{
typedef aux::l_iter_tag tag;
typedef forward_iterator_tag category;
typedef typename Node::item type;
typedef l_iter< typename mpl::next<Node>::type > next;
};
#endif
template<> struct l_iter<l_end>

View File

@@ -79,29 +79,12 @@ struct item_by_order
#else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Map, long n > struct m_at
{
typedef void_ type;
};
# else
template< long n > struct m_at_impl
{
template< typename Map > struct result_
{
typedef void_ type;
};
};
template< typename Map, long n > struct m_at
{
typedef typename m_at_impl<n>::result_<Map>::type type;
};
# endif
template<>

View File

@@ -73,28 +73,10 @@ struct m_mask
#else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< long n, typename Key, typename T, typename Base >
struct m_item;
# else
template< long n >
struct m_item_impl
{
template< typename Key, typename T, typename Base >
struct result_;
};
template< long n, typename Key, typename T, typename Base >
struct m_item
: m_item_impl<n>::result_<Key,T,Base>
{
};
# endif
template< typename Key, typename T, typename Base >

View File

@@ -28,7 +28,6 @@
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename Map
@@ -83,85 +82,6 @@ struct next< m_iter<Map,max_order,max_order> >
{
};
#else
template<
typename Map
, long order
, long max_order
>
struct next_order;
template<
typename Map
, long order
, long max_order
>
struct next_order_impl
: if_<
is_void_< typename item_by_order<Map,order>::type >
, next_order<Map,(order+1),max_order>
, long_<order>
>::type
{
};
template<
typename Map
, long order
, long max_order
>
struct next_order
: if_c<
(order != max_order)
, next_order_impl<Map,order,max_order>
, long_<order>
>::type
{
};
template<
typename Map
, long order
, long max_order
>
struct m_iter;
struct m_iter_empty_base {};
template<
typename Map
, long order
, long max_order
>
struct m_iter_base
{
typedef typename item_by_order<Map,order>::type type;
typedef m_iter<
Map
, next_order<Map,order+1,max_order>::value
, max_order
> next;
};
template<
typename Map
, long order
, long max_order
>
struct m_iter
: if_c<
(order == max_order)
, m_iter_empty_base
, m_iter_base<Map,order,max_order>
>::type
{
typedef forward_iterator_tag category;
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}}

View File

@@ -49,7 +49,6 @@ struct BOOST_PP_CAT(map,i_)
#else // "brute force" implementation
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Map>
struct m_at<Map,BOOST_PP_DEC(i_)>
@@ -64,28 +63,6 @@ struct m_item<i_,Key,T,Base>
typedef pair<Key,T> BOOST_PP_CAT(item,BOOST_PP_DEC(i_));
};
# else
template<>
struct m_at_impl<BOOST_PP_DEC(i_)>
{
template< typename Map > struct result_
{
typedef typename Map::BOOST_PP_CAT(item,BOOST_PP_DEC(i_)) type;
};
};
template<>
struct m_item_impl<i_>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_<Key,T,Base>
{
typedef pair<Key,T> BOOST_PP_CAT(item,BOOST_PP_DEC(i_));
};
};
# endif
template<
BOOST_PP_ENUM_PARAMS(i_, typename P)

View File

@@ -25,11 +25,7 @@
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
#else
# define AUX778076_OP_ARITY 2
#endif
template<
BOOST_MPL_PP_DEFAULT_PARAMS(AUX778076_OP_ARITY, typename N, na)

View File

@@ -58,7 +58,6 @@
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename T, bool has_type_ >
struct quote_impl
@@ -82,25 +81,6 @@ struct quote_impl<T,false>
typedef T type;
};
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template< bool > struct quote_impl
{
template< typename T > struct result_
: T
{
};
};
template<> struct quote_impl<false>
{
template< typename T > struct result_
{
typedef T type;
};
};
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/quote.hpp>))

View File

@@ -46,7 +46,6 @@ template< typename Set, typename Tail > struct s_iter_impl
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Set, typename Tail >
struct next< s_iter<Set,Tail> >
@@ -70,25 +69,6 @@ template< typename Set > struct s_iter<Set, set0<> >
typedef forward_iterator_tag category;
};
#else
template< typename Set >
struct s_end_iter
{
typedef forward_iterator_tag category;
typedef s_iter<Set,set0<> > next;
};
template< typename Set, typename Tail > struct s_iter
: if_<
is_same< Tail,set0<> >
, s_end_iter<Set>
, s_iter_impl<Set,Tail>
>::type
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}}

View File

@@ -57,15 +57,8 @@ namespace boost { namespace mpl {
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< int size, typename F, typename Args >
struct unpack_args_impl;
#else
template< int size > struct unpack_args_impl
{
template< typename F, typename Args > struct apply;
};
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/unpack_args.hpp>))
@@ -80,12 +73,7 @@ struct unpack_args
{
template< typename Args > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
: aux::unpack_args_impl< size<Args>::value,F,Args >
# else
: aux::unpack_args_impl< size<Args>::value >
::template apply< F,Args >
# endif
{
#else // BOOST_MPL_CFG_NO_NESTED_FORWARDING
{
@@ -117,7 +105,6 @@ BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
# define i_ BOOST_PP_FRAME_ITERATION(1)
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename F, typename Args >
struct unpack_args_impl<i_,F,Args>
@@ -128,20 +115,6 @@ struct unpack_args_impl<i_,F,Args>
{
};
#else
template<> struct unpack_args_impl<i_>
{
template< typename F, typename Args > struct apply
: BOOST_PP_CAT(apply,i_)<
F
AUX778076_UNPACKED_ARGS(i_, Args)
>
{
};
};
#endif
# undef i_

View File

@@ -45,7 +45,6 @@ struct v_iter
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename Vector
@@ -88,31 +87,6 @@ struct distance< v_iter<Vector,n_>, v_iter<Vector,m_> >
{
};
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template<> struct advance_impl<aux::v_iter_tag>
{
template< typename Iterator, typename N > struct apply
{
enum { pos_ = Iterator::pos_, n_ = N::value };
typedef v_iter<
typename Iterator::vector_
, (pos_ + n_)
> type;
};
};
template<> struct distance_impl<aux::v_iter_tag>
{
template< typename Iter1, typename Iter2 > struct apply
{
enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ };
typedef long_<( pos2_ - pos1_ )> type;
BOOST_STATIC_CONSTANT(long, value = ( pos2_ - pos1_ ));
};
};
#endif
}}