fixes for tagged lambda oversights

[SVN r19451]
This commit is contained in:
Aleksey Gurtovoy
2003-08-05 02:13:04 +00:00
parent c159a0d3ce
commit b842e17901
24 changed files with 219 additions and 130 deletions

View File

@@ -6,7 +6,7 @@
#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED #ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED #define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
// + file: boost/mpl/full_lambda.hpp // + file: boost/mpl/aux_/full_lambda.hpp
// + last modified: 03/aug/03 // + last modified: 03/aug/03
// Copyright (c) 2001-03 // Copyright (c) 2001-03

View File

@@ -6,7 +6,7 @@
#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED #ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
// + file: boost/mpl/lambda_no_ctps.hpp // + file: boost/mpl/aux_/lambda_no_ctps.hpp
// + last modified: 03/aug/03 // + last modified: 03/aug/03
// Copyright (c) 2001-03 // Copyright (c) 2001-03

View File

@@ -29,11 +29,12 @@
# define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \ # define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \
template< \ template< \
BOOST_MPL_PP_PARAMS(i, typename T) \ BOOST_MPL_PP_PARAMS(i, typename T) \
, typename Tag \
> \ > \
struct lambda< \ struct lambda< \
name< BOOST_MPL_PP_PARAMS(i, T) > \ name< BOOST_MPL_PP_PARAMS(i, T) > \
, Tag \
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \
, void_ \
> \ > \
{ \ { \
typedef name< BOOST_MPL_PP_PARAMS(i, T) > type; \ typedef name< BOOST_MPL_PP_PARAMS(i, T) > type; \

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/full_lambda.hpp' header // preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/full_lambda.hpp' header // preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/full_lambda.hpp' header // preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/full_lambda.hpp' header // preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/full_lambda.hpp' header // preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/full_lambda.hpp' header // preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/full_lambda.hpp' header // preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -6,6 +6,7 @@ namespace mpl {
template< template<
typename T typename T
, typename Tag
, typename Protect = false_ , typename Protect = false_
> >
@@ -17,10 +18,11 @@ struct lambda_impl
template< template<
typename T typename T
, typename Tag = void_
> >
struct lambda struct lambda
: lambda_impl< T,false_ > : lambda_impl< T,Tag,false_ >
{ {
}; };
@@ -43,8 +45,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux } // namespace aux
template< int N, typename Protect > template< int N, typename Tag, typename Protect >
struct lambda_impl< arg<N>,Protect > struct lambda_impl< arg<N>,Tag,Protect >
{ {
typedef true_ is_le; typedef true_ is_le;
typedef arg<N> type; typedef arg<N> type;
@@ -52,10 +54,12 @@ struct lambda_impl< arg<N>,Protect >
template< template<
typename F typename F
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
bind0<F> bind0<F>
, Tag
, Protect , Protect
> >
{ {
@@ -68,16 +72,17 @@ struct lambda_impl<
template< template<
template< typename P1 > class F template< typename P1 > class F
, typename T1 , typename T1
, typename Tag
> >
struct lambda< F<T1> > struct lambda< F<T1>,Tag >
: lambda_impl< F<T1>,true_ > : lambda_impl< F<T1>,Tag,true_ >
{ {
}; };
namespace aux { namespace aux {
template< template<
typename IsLE, typename Protect typename IsLE, typename Tag, typename Protect
, template< typename P1 > class F , template< typename P1 > class F
, typename L1 , typename L1
> >
@@ -90,24 +95,26 @@ struct le_result1
template< template<
template< typename P1 > class F template< typename P1 > class F
, typename Tag
, typename L1 , typename L1
> >
struct le_result1< true_,false_,F,L1 > struct le_result1< true_,Tag,false_,F,L1 >
{ {
typedef bind1< typedef bind1<
quote1<F> quote1< F,Tag >
, typename L1::type , typename L1::type
> type; > type;
}; };
template< template<
template< typename P1 > class F template< typename P1 > class F
, typename Tag
, typename L1 , typename L1
> >
struct le_result1< true_,true_,F,L1 > struct le_result1< true_,Tag,true_,F,L1 >
{ {
typedef protect< bind1< typedef protect< bind1<
quote1<F> quote1< F,Tag >
, typename L1::type , typename L1::type
> > type; > > type;
}; };
@@ -117,19 +124,21 @@ struct le_result1< true_,true_,F,L1 >
template< template<
template< typename P1 > class F template< typename P1 > class F
, typename T1 , typename T1
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
F<T1>, Protect F<T1>, Tag, Protect
> >
{ {
typedef lambda_impl<T1> l1; typedef lambda_impl< T1,Tag > l1;
typedef aux::lambda_or< typedef aux::lambda_or<
l1::is_le::value l1::is_le::value
> is_le; > is_le;
typedef typename aux::le_result1< typedef typename aux::le_result1<
typename is_le::type typename is_le::type
, Tag
, Protect , Protect
, F , F
, l1 , l1
@@ -138,10 +147,12 @@ struct lambda_impl<
template< template<
typename F, typename T1 typename F, typename T1
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
bind1< F,T1 > bind1< F,T1 >
, Tag
, Protect , Protect
> >
{ {
@@ -155,16 +166,17 @@ struct lambda_impl<
template< template<
template< typename P1, typename P2 > class F template< typename P1, typename P2 > class F
, typename T1, typename T2 , typename T1, typename T2
, typename Tag
> >
struct lambda< F<T1,T2> > struct lambda< F<T1,T2>,Tag >
: lambda_impl< F<T1,T2>,true_ > : lambda_impl< F<T1,T2>,Tag,true_ >
{ {
}; };
namespace aux { namespace aux {
template< template<
typename IsLE, typename Protect typename IsLE, typename Tag, typename Protect
, template< typename P1, typename P2 > class F , template< typename P1, typename P2 > class F
, typename L1, typename L2 , typename L1, typename L2
> >
@@ -177,24 +189,26 @@ struct le_result2
template< template<
template< typename P1, typename P2 > class F template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2 , typename L1, typename L2
> >
struct le_result2< true_,false_,F,L1,L2 > struct le_result2< true_,Tag,false_,F,L1,L2 >
{ {
typedef bind2< typedef bind2<
quote2<F> quote2< F,Tag >
, typename L1::type, typename L2::type , typename L1::type, typename L2::type
> type; > type;
}; };
template< template<
template< typename P1, typename P2 > class F template< typename P1, typename P2 > class F
, typename Tag
, typename L1, typename L2 , typename L1, typename L2
> >
struct le_result2< true_,true_,F,L1,L2 > struct le_result2< true_,Tag,true_,F,L1,L2 >
{ {
typedef protect< bind2< typedef protect< bind2<
quote2<F> quote2< F,Tag >
, typename L1::type, typename L2::type , typename L1::type, typename L2::type
> > type; > > type;
}; };
@@ -204,14 +218,15 @@ struct le_result2< true_,true_,F,L1,L2 >
template< template<
template< typename P1, typename P2 > class F template< typename P1, typename P2 > class F
, typename T1, typename T2 , typename T1, typename T2
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
F< T1,T2 >, Protect F< T1,T2 >, Tag, Protect
> >
{ {
typedef lambda_impl<T1> l1; typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T2> l2; typedef lambda_impl< T2,Tag > l2;
typedef aux::lambda_or< typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value l1::is_le::value, l2::is_le::value
@@ -219,6 +234,7 @@ struct lambda_impl<
typedef typename aux::le_result2< typedef typename aux::le_result2<
typename is_le::type typename is_le::type
, Tag
, Protect , Protect
, F , F
, l1, l2 , l1, l2
@@ -227,10 +243,12 @@ struct lambda_impl<
template< template<
typename F, typename T1, typename T2 typename F, typename T1, typename T2
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
bind2< F,T1,T2 > bind2< F,T1,T2 >
, Tag
, Protect , Protect
> >
{ {
@@ -244,16 +262,17 @@ struct lambda_impl<
template< template<
template< typename P1, typename P2, typename P3 > class F template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3 , typename T1, typename T2, typename T3
, typename Tag
> >
struct lambda< F<T1,T2,T3> > struct lambda< F<T1,T2,T3>,Tag >
: lambda_impl< F<T1,T2,T3>,true_ > : lambda_impl< F<T1,T2,T3>,Tag,true_ >
{ {
}; };
namespace aux { namespace aux {
template< template<
typename IsLE, typename Protect typename IsLE, typename Tag, typename Protect
, template< typename P1, typename P2, typename P3 > class F , template< typename P1, typename P2, typename P3 > class F
, typename L1, typename L2, typename L3 , typename L1, typename L2, typename L3
> >
@@ -266,24 +285,26 @@ struct le_result3
template< template<
template< typename P1, typename P2, typename P3 > class F template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3 , typename L1, typename L2, typename L3
> >
struct le_result3< true_,false_,F,L1,L2,L3 > struct le_result3< true_,Tag,false_,F,L1,L2,L3 >
{ {
typedef bind3< typedef bind3<
quote3<F> quote3< F,Tag >
, typename L1::type, typename L2::type, typename L3::type , typename L1::type, typename L2::type, typename L3::type
> type; > type;
}; };
template< template<
template< typename P1, typename P2, typename P3 > class F template< typename P1, typename P2, typename P3 > class F
, typename Tag
, typename L1, typename L2, typename L3 , typename L1, typename L2, typename L3
> >
struct le_result3< true_,true_,F,L1,L2,L3 > struct le_result3< true_,Tag,true_,F,L1,L2,L3 >
{ {
typedef protect< bind3< typedef protect< bind3<
quote3<F> quote3< F,Tag >
, typename L1::type, typename L2::type, typename L3::type , typename L1::type, typename L2::type, typename L3::type
> > type; > > type;
}; };
@@ -293,15 +314,16 @@ struct le_result3< true_,true_,F,L1,L2,L3 >
template< template<
template< typename P1, typename P2, typename P3 > class F template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3 , typename T1, typename T2, typename T3
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
F< T1,T2,T3 >, Protect F< T1,T2,T3 >, Tag, Protect
> >
{ {
typedef lambda_impl<T1> l1; typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T2> l2; typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T3> l3; typedef lambda_impl< T3,Tag > l3;
typedef aux::lambda_or< typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -309,6 +331,7 @@ struct lambda_impl<
typedef typename aux::le_result3< typedef typename aux::le_result3<
typename is_le::type typename is_le::type
, Tag
, Protect , Protect
, F , F
, l1, l2, l3 , l1, l2, l3
@@ -317,10 +340,12 @@ struct lambda_impl<
template< template<
typename F, typename T1, typename T2, typename T3 typename F, typename T1, typename T2, typename T3
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
bind3< F,T1,T2,T3 > bind3< F,T1,T2,T3 >
, Tag
, Protect , Protect
> >
{ {
@@ -334,16 +359,17 @@ struct lambda_impl<
template< template<
template< typename P1, typename P2, typename P3, typename P4 > class F template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4 , typename T1, typename T2, typename T3, typename T4
, typename Tag
> >
struct lambda< F<T1,T2,T3,T4> > struct lambda< F<T1,T2,T3,T4>,Tag >
: lambda_impl< F<T1,T2,T3,T4>,true_ > : lambda_impl< F<T1,T2,T3,T4>,Tag,true_ >
{ {
}; };
namespace aux { namespace aux {
template< template<
typename IsLE, typename Protect typename IsLE, typename Tag, typename Protect
, template< typename P1, typename P2, typename P3, typename P4 > class F , template< typename P1, typename P2, typename P3, typename P4 > class F
, typename L1, typename L2, typename L3, typename L4 , typename L1, typename L2, typename L3, typename L4
> >
@@ -357,12 +383,13 @@ struct le_result4
template< template<
template< typename P1, typename P2, typename P3, typename P4 > class F template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4 , typename L1, typename L2, typename L3, typename L4
> >
struct le_result4< true_,false_,F,L1,L2,L3,L4 > struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 >
{ {
typedef bind4< typedef bind4<
quote4<F> quote4< F,Tag >
, typename L1::type, typename L2::type, typename L3::type , typename L1::type, typename L2::type, typename L3::type
, typename L4::type , typename L4::type
> type; > type;
@@ -370,12 +397,13 @@ struct le_result4< true_,false_,F,L1,L2,L3,L4 >
template< template<
template< typename P1, typename P2, typename P3, typename P4 > class F template< typename P1, typename P2, typename P3, typename P4 > class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4 , typename L1, typename L2, typename L3, typename L4
> >
struct le_result4< true_,true_,F,L1,L2,L3,L4 > struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 >
{ {
typedef protect< bind4< typedef protect< bind4<
quote4<F> quote4< F,Tag >
, typename L1::type, typename L2::type, typename L3::type , typename L1::type, typename L2::type, typename L3::type
, typename L4::type , typename L4::type
> > type; > > type;
@@ -386,16 +414,17 @@ struct le_result4< true_,true_,F,L1,L2,L3,L4 >
template< template<
template< typename P1, typename P2, typename P3, typename P4 > class F template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4 , typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
F< T1,T2,T3,T4 >, Protect F< T1,T2,T3,T4 >, Tag, Protect
> >
{ {
typedef lambda_impl<T1> l1; typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T2> l2; typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T3> l3; typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl<T4> l4; typedef lambda_impl< T4,Tag > l4;
typedef aux::lambda_or< typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -404,6 +433,7 @@ struct lambda_impl<
typedef typename aux::le_result4< typedef typename aux::le_result4<
typename is_le::type typename is_le::type
, Tag
, Protect , Protect
, F , F
, l1, l2, l3, l4 , l1, l2, l3, l4
@@ -412,10 +442,12 @@ struct lambda_impl<
template< template<
typename F, typename T1, typename T2, typename T3, typename T4 typename F, typename T1, typename T2, typename T3, typename T4
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
bind4< F,T1,T2,T3,T4 > bind4< F,T1,T2,T3,T4 >
, Tag
, Protect , Protect
> >
{ {
@@ -433,16 +465,17 @@ template<
> >
class F class F
, typename T1, typename T2, typename T3, typename T4, typename T5 , typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
> >
struct lambda< F<T1,T2,T3,T4,T5> > struct lambda< F<T1,T2,T3,T4,T5>,Tag >
: lambda_impl< F<T1,T2,T3,T4,T5>,true_ > : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ >
{ {
}; };
namespace aux { namespace aux {
template< template<
typename IsLE, typename Protect typename IsLE, typename Tag, typename Protect
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
, typename L1, typename L2, typename L3, typename L4, typename L5 , typename L1, typename L2, typename L3, typename L4, typename L5
> >
@@ -460,12 +493,13 @@ template<
, typename P5 , typename P5
> >
class F class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5 , typename L1, typename L2, typename L3, typename L4, typename L5
> >
struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 >
{ {
typedef bind5< typedef bind5<
quote5<F> quote5< F,Tag >
, typename L1::type, typename L2::type, typename L3::type , typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type , typename L4::type, typename L5::type
> type; > type;
@@ -477,12 +511,13 @@ template<
, typename P5 , typename P5
> >
class F class F
, typename Tag
, typename L1, typename L2, typename L3, typename L4, typename L5 , typename L1, typename L2, typename L3, typename L4, typename L5
> >
struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 >
{ {
typedef protect< bind5< typedef protect< bind5<
quote5<F> quote5< F,Tag >
, typename L1::type, typename L2::type, typename L3::type , typename L1::type, typename L2::type, typename L3::type
, typename L4::type, typename L5::type , typename L4::type, typename L5::type
> > type; > > type;
@@ -497,17 +532,18 @@ template<
> >
class F class F
, typename T1, typename T2, typename T3, typename T4, typename T5 , typename T1, typename T2, typename T3, typename T4, typename T5
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
F< T1,T2,T3,T4,T5 >, Protect F< T1,T2,T3,T4,T5 >, Tag, Protect
> >
{ {
typedef lambda_impl<T1> l1; typedef lambda_impl< T1,Tag > l1;
typedef lambda_impl<T2> l2; typedef lambda_impl< T2,Tag > l2;
typedef lambda_impl<T3> l3; typedef lambda_impl< T3,Tag > l3;
typedef lambda_impl<T4> l4; typedef lambda_impl< T4,Tag > l4;
typedef lambda_impl<T5> l5; typedef lambda_impl< T5,Tag > l5;
typedef aux::lambda_or< typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value l1::is_le::value, l2::is_le::value, l3::is_le::value
@@ -516,6 +552,7 @@ struct lambda_impl<
typedef typename aux::le_result5< typedef typename aux::le_result5<
typename is_le::type typename is_le::type
, Tag
, Protect , Protect
, F , F
, l1, l2, l3, l4, l5 , l1, l2, l3, l4, l5
@@ -525,10 +562,12 @@ struct lambda_impl<
template< template<
typename F, typename T1, typename T2, typename T3, typename T4 typename F, typename T1, typename T2, typename T3, typename T4
, typename T5 , typename T5
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 > bind5< F,T1,T2,T3,T4,T5 >
, Tag
, Protect , Protect
> >
{ {
@@ -540,21 +579,24 @@ struct lambda_impl<
}; };
// special case for 'protect' // special case for 'protect'
template< typename T, typename Protect > template< typename T, typename Tag, typename Protect >
struct lambda_impl< protect<T>,Protect > struct lambda_impl< protect<T>,Tag,Protect >
{ {
typedef false_ is_le; typedef false_ is_le;
typedef protect<T> type; typedef protect<T> type;
}; };
// specializations for main 'bind', 'bind1st' and 'bind2nd' forms // specializations for main 'bind', 'bind1st' and 'bind2nd' forms
template< template<
typename F, typename T1, typename T2, typename T3, typename T4 typename F, typename T1, typename T2, typename T3, typename T4
, typename T5 , typename T5
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 > bind< F,T1,T2,T3,T4,T5 >
, Tag
, Protect , Protect
> >
@@ -565,9 +607,10 @@ struct lambda_impl<
template< template<
typename F, typename T typename F, typename T
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< bind1st<F,T>,Protect > struct lambda_impl< bind1st<F,T>,Tag,Protect >
{ {
typedef false_ is_le; typedef false_ is_le;
typedef bind1st< F,T > type; typedef bind1st< F,T > type;
@@ -575,9 +618,10 @@ struct lambda_impl< bind1st<F,T>,Protect >
template< template<
typename F, typename T typename F, typename T
, typename Tag
, typename Protect , typename Protect
> >
struct lambda_impl< bind2nd<F,T>,Protect > struct lambda_impl< bind2nd<F,T>,Tag,Protect >
{ {
typedef false_ is_le; typedef false_ is_le;
typedef bind2nd< F,T > type; typedef bind2nd< F,T > type;

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {
@@ -8,7 +8,7 @@ namespace aux {
template< int arity_, bool Protect > struct lambda_impl template< int arity_, bool Protect > struct lambda_impl
{ {
template< typename T > struct result_ template< typename T, typename Tag > struct result_
{ {
typedef T type; typedef T type;
}; };
@@ -16,142 +16,184 @@ template< int arity_, bool Protect > struct lambda_impl
template<> struct lambda_impl<1, false> template<> struct lambda_impl<1, false>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef bind1< typedef bind1<
f_ f_
, typename lambda< typename F::arg1, false >::type , arg1
> type; > type;
}; };
}; };
template<> struct lambda_impl<1, true> template<> struct lambda_impl<1, true>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef mpl::protect< bind1< typedef mpl::protect< bind1<
f_ f_
, typename lambda< typename F::arg1, false >::type , arg1
> > type; > > type;
}; };
}; };
template<> struct lambda_impl<2, false> template<> struct lambda_impl<2, false>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef bind2< typedef bind2<
f_ f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> type; > type;
}; };
}; };
template<> struct lambda_impl<2, true> template<> struct lambda_impl<2, true>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef mpl::protect< bind2< typedef mpl::protect< bind2<
f_ f_
, arg1, arg2
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type
> > type; > > type;
}; };
}; };
template<> struct lambda_impl<3, false> template<> struct lambda_impl<3, false>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef bind3< typedef bind3<
f_ f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> type; > type;
}; };
}; };
template<> struct lambda_impl<3, true> template<> struct lambda_impl<3, true>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef mpl::protect< bind3< typedef mpl::protect< bind3<
f_ f_
, arg1, arg2, arg3
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type
> > type; > > type;
}; };
}; };
template<> struct lambda_impl<4, false> template<> struct lambda_impl<4, false>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef bind4< typedef bind4<
f_ f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> type; > type;
}; };
}; };
template<> struct lambda_impl<4, true> template<> struct lambda_impl<4, true>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef mpl::protect< bind4< typedef mpl::protect< bind4<
f_ f_
, arg1, arg2, arg3, arg4
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type
> > type; > > type;
}; };
}; };
template<> struct lambda_impl<5, false> template<> struct lambda_impl<5, false>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef bind5< typedef bind5<
f_ f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> type; > type;
}; };
}; };
template<> struct lambda_impl<5, true> template<> struct lambda_impl<5, true>
{ {
template< typename F > struct result_ template< typename F, typename Tag > struct result_
{ {
typedef typename F::rebind f_; typedef typename F::rebind f_;
typedef typename lambda< typename F::arg1, Tag, false >::type arg1;
typedef typename lambda< typename F::arg2, Tag, false >::type arg2;
typedef typename lambda< typename F::arg3, Tag, false >::type arg3;
typedef typename lambda< typename F::arg4, Tag, false >::type arg4;
typedef typename lambda< typename F::arg5, Tag, false >::type arg5;
typedef mpl::protect< bind5< typedef mpl::protect< bind5<
f_ f_
, arg1, arg2, arg3, arg4, arg5
,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type
> > type; > > type;
}; };
}; };
} // namespace aux } // namespace aux
template< typename T, bool Protect = true > template<
typename T
, typename Tag = void_
, bool Protect = true
>
struct lambda struct lambda
: aux::lambda_impl< : aux::lambda_impl<
::boost::mpl::aux::template_arity<T>::value ::boost::mpl::aux::template_arity<T>::value
, Protect , Protect
>::template result_<T> >::template result_< T,Tag >
{ {
}; };

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/full_lambda.hpp' header // preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -1,4 +1,4 @@
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header // preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header
// see the original for copyright information // see the original for copyright information
namespace boost { namespace boost {

View File

@@ -0,0 +1,2 @@
#define BOOST_NO_CONFIG
#define BOOST_NO_TEMPLATE_TEMPLATES

View File

@@ -1 +1 @@
F:\mingw\bin\gcc.exe -E -C -P -I%1 -D BOOST_USER_CONFIG="<%1/libs/mpl/preprocessed/include/%2/user.hpp>" %3 >%4 c:\home\mingw\bin\gcc.exe -E -C -P -I%1 -D BOOST_USER_CONFIG="<%1/libs/mpl/preprocessed/include/%2/user.hpp>" %3 >%4

View File

@@ -74,7 +74,7 @@ def main( all_modes, src_dir, dst_dir ):
if __name__ == '__main__': if __name__ == '__main__':
main( main(
["msvc60", "msvc70", "bcc", "bcc551", "gcc", "mwcw", "no_ctps", "plain"] ["bcc", "bcc551", "gcc", "msvc60", "msvc70", "mwcw", "no_ctps", "no_ttp", "plain"]
, "src" , "src"
, "boost\\mpl\\aux_\\preprocessed" , "boost\\mpl\\aux_\\preprocessed"
) )