From d49590c199f5fade500606d0319e3b559e0febaa Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Tue, 8 Jul 2003 05:40:14 +0000 Subject: [PATCH] list<> iteration bug fix [SVN r18975] --- .../boost/mpl/aux_/preprocessed/bcc/list.hpp | 27 ++++--- .../mpl/aux_/preprocessed/bcc551/list.hpp | 27 ++++--- .../boost/mpl/aux_/preprocessed/gcc/list.hpp | 27 ++++--- .../mpl/aux_/preprocessed/msvc60/list.hpp | 72 +++++++++---------- .../mpl/aux_/preprocessed/msvc70/list.hpp | 72 +++++++++---------- .../boost/mpl/aux_/preprocessed/mwcw/list.hpp | 27 ++++--- .../mpl/aux_/preprocessed/no_ctps/list.hpp | 72 +++++++++---------- .../mpl/aux_/preprocessed/plain/list.hpp | 20 +++--- include/boost/mpl/list.hpp | 7 +- 9 files changed, 174 insertions(+), 177 deletions(-) diff --git a/include/boost/mpl/aux_/preprocessed/bcc/list.hpp b/include/boost/mpl/aux_/preprocessed/bcc/list.hpp index 853ff61..1a89231 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/list.hpp @@ -13,7 +13,7 @@ template< struct list; template< - + > struct list< void_, void_, void_, void_, void_, void_, void_, void_, void_ @@ -21,7 +21,7 @@ struct list< > : list0< > { - typedef list0< > type; + typedef list0< >::type type; }; template< @@ -32,18 +32,16 @@ struct list< > : list1 { - typedef list1 type; + typedef typename list1::type type; }; template< typename T0, typename T1 > -struct list< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ - > +struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > : list2< T0,T1 > { - typedef list2< T0,T1 > type; + typedef typename list2< T0,T1 >::type type; }; template< @@ -52,7 +50,7 @@ template< struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > : list3< T0,T1,T2 > { - typedef list3< T0,T1,T2 > type; + typedef typename list3< T0,T1,T2 >::type type; }; template< @@ -61,7 +59,7 @@ template< struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > : list4< T0,T1,T2,T3 > { - typedef list4< T0,T1,T2,T3 > type; + typedef typename list4< T0,T1,T2,T3 >::type type; }; template< @@ -70,7 +68,7 @@ template< struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > : list5< T0,T1,T2,T3,T4 > { - typedef list5< T0,T1,T2,T3,T4 > type; + typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< @@ -80,7 +78,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > : list6< T0,T1,T2,T3,T4,T5 > { - typedef list6< T0,T1,T2,T3,T4,T5 > type; + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< @@ -90,7 +88,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > : list7< T0,T1,T2,T3,T4,T5,T6 > { - typedef list7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< @@ -100,7 +98,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< @@ -110,10 +108,11 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; // primary template (not a specialization!) + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp index 853ff61..1a89231 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp @@ -13,7 +13,7 @@ template< struct list; template< - + > struct list< void_, void_, void_, void_, void_, void_, void_, void_, void_ @@ -21,7 +21,7 @@ struct list< > : list0< > { - typedef list0< > type; + typedef list0< >::type type; }; template< @@ -32,18 +32,16 @@ struct list< > : list1 { - typedef list1 type; + typedef typename list1::type type; }; template< typename T0, typename T1 > -struct list< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ - > +struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > : list2< T0,T1 > { - typedef list2< T0,T1 > type; + typedef typename list2< T0,T1 >::type type; }; template< @@ -52,7 +50,7 @@ template< struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > : list3< T0,T1,T2 > { - typedef list3< T0,T1,T2 > type; + typedef typename list3< T0,T1,T2 >::type type; }; template< @@ -61,7 +59,7 @@ template< struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > : list4< T0,T1,T2,T3 > { - typedef list4< T0,T1,T2,T3 > type; + typedef typename list4< T0,T1,T2,T3 >::type type; }; template< @@ -70,7 +68,7 @@ template< struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > : list5< T0,T1,T2,T3,T4 > { - typedef list5< T0,T1,T2,T3,T4 > type; + typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< @@ -80,7 +78,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > : list6< T0,T1,T2,T3,T4,T5 > { - typedef list6< T0,T1,T2,T3,T4,T5 > type; + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< @@ -90,7 +88,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > : list7< T0,T1,T2,T3,T4,T5,T6 > { - typedef list7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< @@ -100,7 +98,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< @@ -110,10 +108,11 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; // primary template (not a specialization!) + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 diff --git a/include/boost/mpl/aux_/preprocessed/gcc/list.hpp b/include/boost/mpl/aux_/preprocessed/gcc/list.hpp index 853ff61..1a89231 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/list.hpp @@ -13,7 +13,7 @@ template< struct list; template< - + > struct list< void_, void_, void_, void_, void_, void_, void_, void_, void_ @@ -21,7 +21,7 @@ struct list< > : list0< > { - typedef list0< > type; + typedef list0< >::type type; }; template< @@ -32,18 +32,16 @@ struct list< > : list1 { - typedef list1 type; + typedef typename list1::type type; }; template< typename T0, typename T1 > -struct list< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ - > +struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > : list2< T0,T1 > { - typedef list2< T0,T1 > type; + typedef typename list2< T0,T1 >::type type; }; template< @@ -52,7 +50,7 @@ template< struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > : list3< T0,T1,T2 > { - typedef list3< T0,T1,T2 > type; + typedef typename list3< T0,T1,T2 >::type type; }; template< @@ -61,7 +59,7 @@ template< struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > : list4< T0,T1,T2,T3 > { - typedef list4< T0,T1,T2,T3 > type; + typedef typename list4< T0,T1,T2,T3 >::type type; }; template< @@ -70,7 +68,7 @@ template< struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > : list5< T0,T1,T2,T3,T4 > { - typedef list5< T0,T1,T2,T3,T4 > type; + typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< @@ -80,7 +78,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > : list6< T0,T1,T2,T3,T4,T5 > { - typedef list6< T0,T1,T2,T3,T4,T5 > type; + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< @@ -90,7 +88,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > : list7< T0,T1,T2,T3,T4,T5,T6 > { - typedef list7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< @@ -100,7 +98,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< @@ -110,10 +108,11 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; // primary template (not a specialization!) + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp index 9c7d255..8980b9f 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp @@ -3,7 +3,6 @@ namespace boost { namespace mpl { - namespace aux { template< nttp_int N > struct list_impl_chooser; } @@ -19,9 +18,9 @@ struct list_impl_chooser<0> > struct result_ { - typedef list0< - - > type; + typedef typename list0< + + >::type type; }; }; @@ -38,9 +37,9 @@ struct list_impl_chooser<1> > struct result_ { - typedef list1< - T0 - > type; + typedef typename list1< + T0 + >::type type; }; }; @@ -57,9 +56,9 @@ struct list_impl_chooser<2> > struct result_ { - typedef list2< - T0, T1 - > type; + typedef typename list2< + T0, T1 + >::type type; }; }; @@ -76,9 +75,9 @@ struct list_impl_chooser<3> > struct result_ { - typedef list3< - T0, T1, T2 - > type; + typedef typename list3< + T0, T1, T2 + >::type type; }; }; @@ -95,9 +94,9 @@ struct list_impl_chooser<4> > struct result_ { - typedef list4< - T0, T1, T2, T3 - > type; + typedef typename list4< + T0, T1, T2, T3 + >::type type; }; }; @@ -114,9 +113,9 @@ struct list_impl_chooser<5> > struct result_ { - typedef list5< - T0, T1, T2, T3, T4 - > type; + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; }; }; @@ -133,9 +132,9 @@ struct list_impl_chooser<6> > struct result_ { - typedef list6< - T0, T1, T2, T3, T4, T5 - > type; + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; }; }; @@ -152,9 +151,9 @@ struct list_impl_chooser<7> > struct result_ { - typedef list7< - T0, T1, T2, T3, T4, T5, T6 - > type; + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; }; }; @@ -171,9 +170,9 @@ struct list_impl_chooser<8> > struct result_ { - typedef list8< - T0, T1, T2, T3, T4, T5, T6, T7 - > type; + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; }; }; @@ -190,9 +189,9 @@ struct list_impl_chooser<9> > struct result_ { - typedef list9< - T0, T1, T2, T3, T4, T5, T6, T7, T8 - > type; + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; }; }; @@ -209,9 +208,9 @@ struct list_impl_chooser<10> > struct result_ { - typedef list10< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 - > type; + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; }; }; @@ -244,6 +243,7 @@ struct list_count_args + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value }; + }; template< @@ -253,7 +253,7 @@ template< struct list_impl { typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< + typedef typename aux::list_impl_chooser< arg_num_::value >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; @@ -270,7 +270,7 @@ struct list : aux::list_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type { typedef typename aux::list_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp index e42b130..4adfea8 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp @@ -3,7 +3,6 @@ namespace boost { namespace mpl { - namespace aux { template< int N > struct list_impl_chooser; } @@ -19,9 +18,9 @@ struct list_impl_chooser<0> > struct result_ { - typedef list0< - - > type; + typedef typename list0< + + >::type type; }; }; @@ -38,9 +37,9 @@ struct list_impl_chooser<1> > struct result_ { - typedef list1< - T0 - > type; + typedef typename list1< + T0 + >::type type; }; }; @@ -57,9 +56,9 @@ struct list_impl_chooser<2> > struct result_ { - typedef list2< - T0, T1 - > type; + typedef typename list2< + T0, T1 + >::type type; }; }; @@ -76,9 +75,9 @@ struct list_impl_chooser<3> > struct result_ { - typedef list3< - T0, T1, T2 - > type; + typedef typename list3< + T0, T1, T2 + >::type type; }; }; @@ -95,9 +94,9 @@ struct list_impl_chooser<4> > struct result_ { - typedef list4< - T0, T1, T2, T3 - > type; + typedef typename list4< + T0, T1, T2, T3 + >::type type; }; }; @@ -114,9 +113,9 @@ struct list_impl_chooser<5> > struct result_ { - typedef list5< - T0, T1, T2, T3, T4 - > type; + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; }; }; @@ -133,9 +132,9 @@ struct list_impl_chooser<6> > struct result_ { - typedef list6< - T0, T1, T2, T3, T4, T5 - > type; + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; }; }; @@ -152,9 +151,9 @@ struct list_impl_chooser<7> > struct result_ { - typedef list7< - T0, T1, T2, T3, T4, T5, T6 - > type; + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; }; }; @@ -171,9 +170,9 @@ struct list_impl_chooser<8> > struct result_ { - typedef list8< - T0, T1, T2, T3, T4, T5, T6, T7 - > type; + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; }; }; @@ -190,9 +189,9 @@ struct list_impl_chooser<9> > struct result_ { - typedef list9< - T0, T1, T2, T3, T4, T5, T6, T7, T8 - > type; + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; }; }; @@ -209,9 +208,9 @@ struct list_impl_chooser<10> > struct result_ { - typedef list10< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 - > type; + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; }; }; @@ -244,6 +243,7 @@ struct list_count_args + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value }; + }; template< @@ -253,7 +253,7 @@ template< struct list_impl { typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< + typedef typename aux::list_impl_chooser< arg_num_::value >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; @@ -270,7 +270,7 @@ struct list : aux::list_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type { typedef typename aux::list_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp index 853ff61..1a89231 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp @@ -13,7 +13,7 @@ template< struct list; template< - + > struct list< void_, void_, void_, void_, void_, void_, void_, void_, void_ @@ -21,7 +21,7 @@ struct list< > : list0< > { - typedef list0< > type; + typedef list0< >::type type; }; template< @@ -32,18 +32,16 @@ struct list< > : list1 { - typedef list1 type; + typedef typename list1::type type; }; template< typename T0, typename T1 > -struct list< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ - > +struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > : list2< T0,T1 > { - typedef list2< T0,T1 > type; + typedef typename list2< T0,T1 >::type type; }; template< @@ -52,7 +50,7 @@ template< struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > : list3< T0,T1,T2 > { - typedef list3< T0,T1,T2 > type; + typedef typename list3< T0,T1,T2 >::type type; }; template< @@ -61,7 +59,7 @@ template< struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > : list4< T0,T1,T2,T3 > { - typedef list4< T0,T1,T2,T3 > type; + typedef typename list4< T0,T1,T2,T3 >::type type; }; template< @@ -70,7 +68,7 @@ template< struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > : list5< T0,T1,T2,T3,T4 > { - typedef list5< T0,T1,T2,T3,T4 > type; + typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< @@ -80,7 +78,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > : list6< T0,T1,T2,T3,T4,T5 > { - typedef list6< T0,T1,T2,T3,T4,T5 > type; + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< @@ -90,7 +88,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > : list7< T0,T1,T2,T3,T4,T5,T6 > { - typedef list7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< @@ -100,7 +98,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< @@ -110,10 +108,11 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; // primary template (not a specialization!) + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp index be47d6e..5879ab9 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp @@ -3,7 +3,6 @@ namespace boost { namespace mpl { - namespace aux { template< int N > struct list_impl_chooser; } @@ -19,9 +18,9 @@ struct list_impl_chooser<0> > struct result_ { - typedef list0< - - > type; + typedef typename list0< + + >::type type; }; }; @@ -38,9 +37,9 @@ struct list_impl_chooser<1> > struct result_ { - typedef list1< - T0 - > type; + typedef typename list1< + T0 + >::type type; }; }; @@ -57,9 +56,9 @@ struct list_impl_chooser<2> > struct result_ { - typedef list2< - T0, T1 - > type; + typedef typename list2< + T0, T1 + >::type type; }; }; @@ -76,9 +75,9 @@ struct list_impl_chooser<3> > struct result_ { - typedef list3< - T0, T1, T2 - > type; + typedef typename list3< + T0, T1, T2 + >::type type; }; }; @@ -95,9 +94,9 @@ struct list_impl_chooser<4> > struct result_ { - typedef list4< - T0, T1, T2, T3 - > type; + typedef typename list4< + T0, T1, T2, T3 + >::type type; }; }; @@ -114,9 +113,9 @@ struct list_impl_chooser<5> > struct result_ { - typedef list5< - T0, T1, T2, T3, T4 - > type; + typedef typename list5< + T0, T1, T2, T3, T4 + >::type type; }; }; @@ -133,9 +132,9 @@ struct list_impl_chooser<6> > struct result_ { - typedef list6< - T0, T1, T2, T3, T4, T5 - > type; + typedef typename list6< + T0, T1, T2, T3, T4, T5 + >::type type; }; }; @@ -152,9 +151,9 @@ struct list_impl_chooser<7> > struct result_ { - typedef list7< - T0, T1, T2, T3, T4, T5, T6 - > type; + typedef typename list7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; }; }; @@ -171,9 +170,9 @@ struct list_impl_chooser<8> > struct result_ { - typedef list8< - T0, T1, T2, T3, T4, T5, T6, T7 - > type; + typedef typename list8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; }; }; @@ -190,9 +189,9 @@ struct list_impl_chooser<9> > struct result_ { - typedef list9< - T0, T1, T2, T3, T4, T5, T6, T7, T8 - > type; + typedef typename list9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; }; }; @@ -209,9 +208,9 @@ struct list_impl_chooser<10> > struct result_ { - typedef list10< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 - > type; + typedef typename list10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; }; }; @@ -244,6 +243,7 @@ struct list_count_args + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value ; + }; template< @@ -253,7 +253,7 @@ template< struct list_impl { typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< + typedef typename aux::list_impl_chooser< arg_num_::value >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; @@ -270,7 +270,7 @@ struct list : aux::list_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type { typedef typename aux::list_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; diff --git a/include/boost/mpl/aux_/preprocessed/plain/list.hpp b/include/boost/mpl/aux_/preprocessed/plain/list.hpp index 4555bba..1a89231 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/list.hpp @@ -21,7 +21,7 @@ struct list< > : list0< > { - typedef list0< > type; + typedef list0< >::type type; }; template< @@ -32,7 +32,7 @@ struct list< > : list1 { - typedef list1 type; + typedef typename list1::type type; }; template< @@ -41,7 +41,7 @@ template< struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > : list2< T0,T1 > { - typedef list2< T0,T1 > type; + typedef typename list2< T0,T1 >::type type; }; template< @@ -50,7 +50,7 @@ template< struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > : list3< T0,T1,T2 > { - typedef list3< T0,T1,T2 > type; + typedef typename list3< T0,T1,T2 >::type type; }; template< @@ -59,7 +59,7 @@ template< struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > : list4< T0,T1,T2,T3 > { - typedef list4< T0,T1,T2,T3 > type; + typedef typename list4< T0,T1,T2,T3 >::type type; }; template< @@ -68,7 +68,7 @@ template< struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > : list5< T0,T1,T2,T3,T4 > { - typedef list5< T0,T1,T2,T3,T4 > type; + typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< @@ -78,7 +78,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > : list6< T0,T1,T2,T3,T4,T5 > { - typedef list6< T0,T1,T2,T3,T4,T5 > type; + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< @@ -88,7 +88,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > : list7< T0,T1,T2,T3,T4,T5,T6 > { - typedef list7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< @@ -98,7 +98,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< @@ -108,7 +108,7 @@ template< struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; // primary template (not a specialization!) diff --git a/include/boost/mpl/list.hpp b/include/boost/mpl/list.hpp index 66161bd..ce60e1a 100644 --- a/include/boost/mpl/list.hpp +++ b/include/boost/mpl/list.hpp @@ -57,6 +57,7 @@ # include "boost/preprocessor/enum.hpp" # include "boost/preprocessor/repeat.hpp" # include "boost/preprocessor/comma_if.hpp" +# include "boost/preprocessor/expr_if.hpp" # include "boost/preprocessor/iterate.hpp" # include "boost/config.hpp" @@ -184,7 +185,7 @@ template< struct list< AUX_LIST_N_PARTIAL_SPEC_PARAMS(i, T, void_) > : BOOST_PP_CAT(list,i)< AUX_LIST_N_PARAMS(i, T) > { - typedef BOOST_PP_CAT(list,i)< AUX_LIST_N_PARAMS(i, T) > type; + typedef BOOST_PP_EXPR_IF(i,typename) BOOST_PP_CAT(list,i)< AUX_LIST_N_PARAMS(i, T) >::type type; }; #endif // i == BOOST_MPL_LIMIT_LIST_SIZE @@ -201,9 +202,9 @@ struct list_impl_chooser > struct result_ { - typedef BOOST_PP_CAT(list,i)< + typedef typename BOOST_PP_CAT(list,i)< AUX_LIST_N_PARAMS(i, T) - > type; + >::type type; }; };