From f643f9a5d86259863275dde6de8db2af9ff97f41 Mon Sep 17 00:00:00 2001 From: syntheticpp Date: Wed, 25 Oct 2006 20:40:40 +0000 Subject: [PATCH] use recursive definition, it's more standard conform git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@768 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/Sequence.h | 471 ++-------------------------------------- 1 file changed, 13 insertions(+), 458 deletions(-) diff --git a/include/loki/Sequence.h b/include/loki/Sequence.h index 4a35121..3d9359c 100644 --- a/include/loki/Sequence.h +++ b/include/loki/Sequence.h @@ -27,466 +27,21 @@ namespace Loki class T11=NullType,class T12=NullType,class T13=NullType,class T14=NullType,class T15=NullType, class T16=NullType,class T17=NullType,class T18=NullType,class T19=NullType,class T20=NullType > - struct Seq; - - template - struct Seq - { - typedef - Typelist - Type; - }; - template - struct Seq - { - typedef - Typelist > - Type; - }; - template - struct Seq - { - typedef - Typelist > > - Type; - }; - template - struct Seq - { - typedef - Typelist > > > - Type; - }; - template - struct Seq - { - typedef - Typelist > > > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06> - { - typedef - Typelist > > > > - > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07> - { - typedef - Typelist > > > > - > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08> - { - typedef - Typelist > > > > - > > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09> - { - typedef - Typelist > > > > - > > > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10> - { - typedef - Typelist > > > > - > > > > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11> - { - typedef - Typelist > > > > - > > > > > - > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11,T12> - { - typedef - Typelist > > > > - > > > > > - > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11,T12,T13> - { - typedef - Typelist > > > > - > > > > > - > > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11,T12,T13,T14> - { - typedef - Typelist > > > > - > > > > > - > > > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11,T12,T13,T14,T15> - { - typedef - Typelist > > > > - > > > > > - > > > > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11,T12,T13,T14,T15, - T16> - { - typedef - Typelist > > > > - > > > > > - > > > > > - > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11,T12,T13,T14,T15, - T16,T17> - { - typedef - Typelist > > > > - > > > > > - > > > > > - > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11,T12,T13,T14,T15, - T16,T17,T18> - { - typedef - Typelist > > > > - > > > > > - > > > > > - > > > - Type; - }; - template - struct Seq< T01,T02,T03,T04,T05, - T06,T07,T08,T09,T10, - T11,T12,T13,T14,T15, - T16,T17,T18,T19> - { - typedef - Typelist > > > > - > > > > > - > > > > > - > > > > - Type; - }; - template struct Seq { - typedef - Typelist > > > > - > > > > > - > > > > > - > > > > > - Type; - }; + private: + typedef typename Seq< T02, T03, T04, T05, T06, T07, T08, T09, T10, + T11, T12, T13, T14, T15, T16, T17, T18, T19, T20>::Type + TailResult; + public: + typedef Typelist Type; + }; + + template<> + struct Seq<> + { + typedef NullType Type; + }; } // namespace Loki