From b842e1790133bdbe369870bb3a6961857233d425 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Tue, 5 Aug 2003 02:13:04 +0000 Subject: [PATCH] fixes for tagged lambda oversights [SVN r19451] --- include/boost/mpl/aux_/full_lambda.hpp | 2 +- include/boost/mpl/aux_/lambda_no_ctps.hpp | 2 +- include/boost/mpl/aux_/lambda_spec.hpp | 3 +- .../mpl/aux_/preprocessed/bcc/full_lambda.hpp | 2 +- .../aux_/preprocessed/bcc/lambda_no_ctps.hpp | 2 +- .../aux_/preprocessed/bcc551/full_lambda.hpp | 2 +- .../preprocessed/bcc551/lambda_no_ctps.hpp | 2 +- .../mpl/aux_/preprocessed/gcc/full_lambda.hpp | 2 +- .../aux_/preprocessed/gcc/lambda_no_ctps.hpp | 2 +- .../aux_/preprocessed/msvc60/full_lambda.hpp | 2 +- .../preprocessed/msvc60/lambda_no_ctps.hpp | 2 +- .../aux_/preprocessed/msvc70/full_lambda.hpp | 2 +- .../preprocessed/msvc70/lambda_no_ctps.hpp | 2 +- .../aux_/preprocessed/mwcw/full_lambda.hpp | 2 +- .../aux_/preprocessed/mwcw/lambda_no_ctps.hpp | 2 +- .../aux_/preprocessed/no_ctps/full_lambda.hpp | 2 +- .../preprocessed/no_ctps/lambda_no_ctps.hpp | 2 +- .../aux_/preprocessed/no_ttp/full_lambda.hpp | 198 +++++++++++------- .../preprocessed/no_ttp/lambda_no_ctps.hpp | 106 +++++++--- .../aux_/preprocessed/plain/full_lambda.hpp | 2 +- .../preprocessed/plain/lambda_no_ctps.hpp | 2 +- preprocessed/include/no_ttp/user.hpp | 2 + preprocessed/preprocess.cmd | 2 +- preprocessed/preprocess.py | 2 +- 24 files changed, 219 insertions(+), 130 deletions(-) create mode 100644 preprocessed/include/no_ttp/user.hpp diff --git a/include/boost/mpl/aux_/full_lambda.hpp b/include/boost/mpl/aux_/full_lambda.hpp index bc4442d..2bc0af6 100644 --- a/include/boost/mpl/aux_/full_lambda.hpp +++ b/include/boost/mpl/aux_/full_lambda.hpp @@ -6,7 +6,7 @@ #ifndef 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 // Copyright (c) 2001-03 diff --git a/include/boost/mpl/aux_/lambda_no_ctps.hpp b/include/boost/mpl/aux_/lambda_no_ctps.hpp index da51e51..50826c6 100644 --- a/include/boost/mpl/aux_/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/lambda_no_ctps.hpp @@ -6,7 +6,7 @@ #ifndef 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 // Copyright (c) 2001-03 diff --git a/include/boost/mpl/aux_/lambda_spec.hpp b/include/boost/mpl/aux_/lambda_spec.hpp index b65a4fe..cc8978a 100644 --- a/include/boost/mpl/aux_/lambda_spec.hpp +++ b/include/boost/mpl/aux_/lambda_spec.hpp @@ -29,11 +29,12 @@ # define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \ template< \ BOOST_MPL_PP_PARAMS(i, typename T) \ + , typename Tag \ > \ struct lambda< \ name< BOOST_MPL_PP_PARAMS(i, T) > \ + , Tag \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ - , void_ \ > \ { \ typedef name< BOOST_MPL_PP_PARAMS(i, T) > type; \ diff --git a/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp index 8a5a13e..8e4af31 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp index 4ae5590..4a02653 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp index 8a5a13e..8e4af31 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp index 4ae5590..4a02653 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp index 8a5a13e..8e4af31 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp index 4ae5590..4a02653 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp index c28c77d..5534ac2 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp index e678e50..623faad 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp index c28c77d..5534ac2 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp index 4ae5590..4a02653 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp index c28c77d..5534ac2 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp index 4ae5590..4a02653 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp index c28c77d..5534ac2 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp index 4ae5590..4a02653 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp index 4eae84d..5534ac2 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp @@ -6,8 +6,9 @@ namespace mpl { template< typename T + , typename Tag , typename Protect = false_ - + > struct lambda_impl { @@ -17,10 +18,11 @@ struct lambda_impl template< typename T - + , typename Tag = void_ + > 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 -template< int N, typename Protect > -struct lambda_impl< arg,Protect > +template< int N, typename Tag, typename Protect > +struct lambda_impl< arg,Tag,Protect > { typedef true_ is_le; typedef arg type; @@ -52,11 +54,13 @@ struct lambda_impl< arg,Protect > template< typename F + , typename Tag , typename Protect > struct lambda_impl< bind0 - , Protect + , Tag + , Protect > { typedef false_ is_le; @@ -68,16 +72,17 @@ struct lambda_impl< template< template< typename P1 > class F , typename T1 + , typename Tag > -struct lambda< F > - : lambda_impl< F,true_ > +struct lambda< F,Tag > + : lambda_impl< F,Tag,true_ > { }; namespace aux { template< - typename IsLE, typename Protect + typename IsLE, typename Tag, typename Protect , template< typename P1 > class F , typename L1 > @@ -90,24 +95,26 @@ struct le_result1 template< template< typename P1 > class F + , typename Tag , typename L1 > -struct le_result1< true_,false_,F,L1 > +struct le_result1< true_,Tag,false_,F,L1 > { typedef bind1< - quote1 + quote1< F,Tag > , typename L1::type > type; }; template< template< typename P1 > class F + , typename Tag , typename L1 > -struct le_result1< true_,true_,F,L1 > +struct le_result1< true_,Tag,true_,F,L1 > { typedef protect< bind1< - quote1 + quote1< F,Tag > , typename L1::type > > type; }; @@ -117,19 +124,21 @@ struct le_result1< true_,true_,F,L1 > template< template< typename P1 > class F , typename T1 + , typename Tag , typename Protect > -struct lambda_impl< - F, Protect +struct lambda_impl< + F, Tag, Protect > { - typedef lambda_impl l1; + typedef lambda_impl< T1,Tag > l1; typedef aux::lambda_or< l1::is_le::value > is_le; typedef typename aux::le_result1< typename is_le::type + , Tag , Protect , F , l1 @@ -138,11 +147,13 @@ struct lambda_impl< template< typename F, typename T1 + , typename Tag , typename Protect > struct lambda_impl< bind1< F,T1 > - , Protect + , Tag + , Protect > { typedef false_ is_le; @@ -155,16 +166,17 @@ struct lambda_impl< template< template< typename P1, typename P2 > class F , typename T1, typename T2 + , typename Tag > -struct lambda< F > - : lambda_impl< F,true_ > +struct lambda< F,Tag > + : lambda_impl< F,Tag,true_ > { }; namespace aux { template< - typename IsLE, typename Protect + typename IsLE, typename Tag, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -177,24 +189,26 @@ struct le_result2 template< template< typename P1, typename P2 > class F + , typename Tag , typename L1, typename L2 > -struct le_result2< true_,false_,F,L1,L2 > +struct le_result2< true_,Tag,false_,F,L1,L2 > { typedef bind2< - quote2 + quote2< F,Tag > , typename L1::type, typename L2::type > type; }; template< template< typename P1, typename P2 > class F + , typename Tag , typename L1, typename L2 > -struct le_result2< true_,true_,F,L1,L2 > +struct le_result2< true_,Tag,true_,F,L1,L2 > { typedef protect< bind2< - quote2 + quote2< F,Tag > , typename L1::type, typename L2::type > > type; }; @@ -204,14 +218,15 @@ struct le_result2< true_,true_,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 + , typename Tag , typename Protect > -struct lambda_impl< - F< T1,T2 >, Protect +struct lambda_impl< + F< T1,T2 >, Tag, Protect > { - typedef lambda_impl l1; - typedef lambda_impl l2; + typedef lambda_impl< T1,Tag > l1; + typedef lambda_impl< T2,Tag > l2; typedef aux::lambda_or< l1::is_le::value, l2::is_le::value @@ -219,6 +234,7 @@ struct lambda_impl< typedef typename aux::le_result2< typename is_le::type + , Tag , Protect , F , l1, l2 @@ -227,11 +243,13 @@ struct lambda_impl< template< typename F, typename T1, typename T2 + , typename Tag , typename Protect > struct lambda_impl< bind2< F,T1,T2 > - , Protect + , Tag + , Protect > { typedef false_ is_le; @@ -244,16 +262,17 @@ struct lambda_impl< template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 + , typename Tag > -struct lambda< F > - : lambda_impl< F,true_ > +struct lambda< F,Tag > + : lambda_impl< F,Tag,true_ > { }; namespace aux { template< - typename IsLE, typename Protect + typename IsLE, typename Tag, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -266,24 +285,26 @@ struct le_result3 template< template< typename P1, typename P2, typename P3 > class F + , typename Tag , 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< - quote3 + quote3< F,Tag > , typename L1::type, typename L2::type, typename L3::type > type; }; template< template< typename P1, typename P2, typename P3 > class F + , typename Tag , 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< - quote3 + quote3< F,Tag > , typename L1::type, typename L2::type, typename L3::type > > type; }; @@ -293,15 +314,16 @@ struct le_result3< true_,true_,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 + , typename Tag , typename Protect > -struct lambda_impl< - F< T1,T2,T3 >, Protect +struct lambda_impl< + F< T1,T2,T3 >, Tag, Protect > { - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; + typedef lambda_impl< T1,Tag > l1; + typedef lambda_impl< T2,Tag > l2; + typedef lambda_impl< T3,Tag > l3; typedef aux::lambda_or< l1::is_le::value, l2::is_le::value, l3::is_le::value @@ -309,6 +331,7 @@ struct lambda_impl< typedef typename aux::le_result3< typename is_le::type + , Tag , Protect , F , l1, l2, l3 @@ -317,11 +340,13 @@ struct lambda_impl< template< typename F, typename T1, typename T2, typename T3 + , typename Tag , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > - , Protect + , Tag + , Protect > { typedef false_ is_le; @@ -334,16 +359,17 @@ struct lambda_impl< template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 + , typename Tag > -struct lambda< F > - : lambda_impl< F,true_ > +struct lambda< F,Tag > + : lambda_impl< F,Tag,true_ > { }; namespace aux { template< - typename IsLE, typename Protect + typename IsLE, typename Tag, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,12 +383,13 @@ struct le_result4 template< template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag , 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< - quote4 + quote4< F,Tag > , typename L1::type, typename L2::type, typename L3::type , typename L4::type > type; @@ -370,12 +397,13 @@ struct le_result4< true_,false_,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag , 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< - quote4 + quote4< F,Tag > , typename L1::type, typename L2::type, typename L3::type , typename L4::type > > type; @@ -386,16 +414,17 @@ struct le_result4< true_,true_,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 + , typename Tag , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4 >, Protect +struct lambda_impl< + F< T1,T2,T3,T4 >, Tag, Protect > { - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; - typedef lambda_impl l4; + typedef lambda_impl< T1,Tag > l1; + typedef lambda_impl< T2,Tag > l2; + typedef lambda_impl< T3,Tag > l3; + typedef lambda_impl< T4,Tag > l4; typedef aux::lambda_or< l1::is_le::value, l2::is_le::value, l3::is_le::value @@ -404,6 +433,7 @@ struct lambda_impl< typedef typename aux::le_result4< typename is_le::type + , Tag , Protect , F , l1, l2, l3, l4 @@ -412,11 +442,13 @@ struct lambda_impl< template< typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > - , Protect + , Tag + , Protect > { typedef false_ is_le; @@ -433,16 +465,17 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag > -struct lambda< F > - : lambda_impl< F,true_ > +struct lambda< F,Tag > + : lambda_impl< F,Tag,true_ > { }; namespace aux { template< - typename IsLE, typename Protect + typename IsLE, typename Tag, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -460,12 +493,13 @@ template< , typename P5 > class F + , typename Tag , 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< - quote5 + quote5< F,Tag > , typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > type; @@ -477,12 +511,13 @@ template< , typename P5 > class F + , typename Tag , 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< - quote5 + quote5< F,Tag > , typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > > type; @@ -497,17 +532,18 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5 >, Protect +struct lambda_impl< + F< T1,T2,T3,T4,T5 >, Tag, Protect > { - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; - typedef lambda_impl l4; - typedef lambda_impl l5; + typedef lambda_impl< T1,Tag > l1; + typedef lambda_impl< T2,Tag > l2; + typedef lambda_impl< T3,Tag > l3; + typedef lambda_impl< T4,Tag > l4; + typedef lambda_impl< T5,Tag > l5; typedef aux::lambda_or< l1::is_le::value, l2::is_le::value, l3::is_le::value @@ -516,6 +552,7 @@ struct lambda_impl< typedef typename aux::le_result5< typename is_le::type + , Tag , Protect , F , l1, l2, l3, l4, l5 @@ -525,11 +562,13 @@ struct lambda_impl< template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 + , typename Tag , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > - , Protect + , Tag + , Protect > { typedef false_ is_le; @@ -540,23 +579,26 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, typename Protect > -struct lambda_impl< protect,Protect > +template< typename T, typename Tag, typename Protect > +struct lambda_impl< protect,Tag,Protect > { typedef false_ is_le; typedef protect type; }; // specializations for main 'bind', 'bind1st' and 'bind2nd' forms + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 + , typename Tag , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > - , Protect - + , Tag + , Protect + > { typedef false_ is_le; @@ -565,9 +607,10 @@ struct lambda_impl< template< typename F, typename T + , typename Tag , typename Protect > -struct lambda_impl< bind1st,Protect > +struct lambda_impl< bind1st,Tag,Protect > { typedef false_ is_le; typedef bind1st< F,T > type; @@ -575,9 +618,10 @@ struct lambda_impl< bind1st,Protect > template< typename F, typename T + , typename Tag , typename Protect > -struct lambda_impl< bind2nd,Protect > +struct lambda_impl< bind2nd,Tag,Protect > { typedef false_ is_le; typedef bind2nd< F,T > type; diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp index 23d1969..4a02653 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp @@ -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 namespace boost { @@ -8,7 +8,7 @@ namespace aux { template< int arity_, bool Protect > struct lambda_impl { - template< typename T > struct result_ + template< typename T, typename Tag > struct result_ { typedef T type; }; @@ -16,142 +16,184 @@ template< int arity_, bool Protect > struct lambda_impl 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 lambda< typename F::arg1, Tag, false >::type arg1; typedef bind1< f_ - , typename lambda< typename F::arg1, false >::type + , arg1 > type; }; }; 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 lambda< typename F::arg1, Tag, false >::type arg1; typedef mpl::protect< bind1< f_ - , typename lambda< typename F::arg1, false >::type + , arg1 > > type; }; }; 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 lambda< typename F::arg1, Tag, false >::type arg1; + typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + + typedef bind2< f_ - - ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type + , arg1, arg2 > type; }; }; 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 lambda< typename F::arg1, Tag, false >::type arg1; + typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + + typedef mpl::protect< bind2< f_ - - ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type + , arg1, arg2 > > type; }; }; 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 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< f_ - - ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type + , arg1, arg2, arg3 > type; }; }; 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 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< f_ - - ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type + , arg1, arg2, arg3 > > type; }; }; 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 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< f_ - - ,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 + , arg1, arg2, arg3, arg4 > type; }; }; 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 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< f_ - - ,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 + , arg1, arg2, arg3, arg4 > > type; }; }; 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 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< f_ - - ,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 + , arg1, arg2, arg3, arg4, arg5 > type; }; }; 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 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< f_ - - ,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 + , arg1, arg2, arg3, arg4, arg5 > > type; }; }; } // namespace aux -template< typename T, bool Protect = true > +template< + typename T + , typename Tag = void_ + , bool Protect = true + > struct lambda : aux::lambda_impl< ::boost::mpl::aux::template_arity::value , Protect - >::template result_ + >::template result_< T,Tag > { }; diff --git a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp index c28c77d..5534ac2 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp @@ -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 namespace boost { diff --git a/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp index 4ae5590..4a02653 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp @@ -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 namespace boost { diff --git a/preprocessed/include/no_ttp/user.hpp b/preprocessed/include/no_ttp/user.hpp new file mode 100644 index 0000000..5b50b9a --- /dev/null +++ b/preprocessed/include/no_ttp/user.hpp @@ -0,0 +1,2 @@ +#define BOOST_NO_CONFIG +#define BOOST_NO_TEMPLATE_TEMPLATES diff --git a/preprocessed/preprocess.cmd b/preprocessed/preprocess.cmd index 06a5cc9..9c0c1f7 100755 --- a/preprocessed/preprocess.cmd +++ b/preprocessed/preprocess.cmd @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/preprocessed/preprocess.py b/preprocessed/preprocess.py index 7484a05..9c707e7 100644 --- a/preprocessed/preprocess.py +++ b/preprocessed/preprocess.py @@ -74,7 +74,7 @@ def main( all_modes, src_dir, dst_dir ): if __name__ == '__main__': main( - ["msvc60", "msvc70", "bcc", "bcc551", "gcc", "mwcw", "no_ctps", "plain"] + ["bcc", "bcc551", "gcc", "msvc60", "msvc70", "mwcw", "no_ctps", "no_ttp", "plain"] , "src" , "boost\\mpl\\aux_\\preprocessed" )