move macros into LOKI_ namespace

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@269 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2005-09-26 07:33:05 +00:00
parent 82a749919e
commit 6e99716c13
32 changed files with 480 additions and 382 deletions

View file

@ -15,8 +15,8 @@
// Last update: June 20, 2001 // Last update: June 20, 2001
#ifndef ABSTRACTFACTORY_INC_ #ifndef LOKI_ABSTRACTFACTORY_INC_
#define ABSTRACTFACTORY_INC_ #define LOKI_ABSTRACTFACTORY_INC_
#include "Typelist.h" #include "Typelist.h"
#include "TypeManip.h" #include "TypeManip.h"

View file

@ -13,8 +13,8 @@
// without express or implied warranty. // without express or implied warranty.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef ASSOCVECTOR_INC_ #ifndef LOKI_ASSOCVECTOR_INC_
#define ASSOCVECTOR_INC_ #define LOKI_ASSOCVECTOR_INC_
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>

View file

@ -12,8 +12,8 @@
// Last update: Oct 10, 2002 // Last update: Oct 10, 2002
#ifndef DATAGENERATORS_H #ifndef LOKI_DATAGENERATORS_H
#define DATAGENERATORS_H #define LOKI_DATAGENERATORS_H
#include "Typelist.h" #include "Typelist.h"
//Reference version //Reference version

View file

@ -15,8 +15,8 @@
// Last update: June 20, 2001 // Last update: June 20, 2001
#ifndef EMPTYTYPE_INC_ #ifndef LOKI_EMPTYTYPE_INC_
#define EMPTYTYPE_INC_ #define LOKI_EMPTYTYPE_INC_
namespace Loki namespace Loki
{ {

View file

@ -13,8 +13,8 @@
// $Header$ // $Header$
#ifndef FACTORYPARM_INC_ #ifndef LOKI_FACTORYPARM_INC_
#define FACTORYPARM_INC_ #define LOKI_FACTORYPARM_INC_
#include "LokiTypeInfo.h" #include "LokiTypeInfo.h"
#include "Functor.h" #include "Functor.h"
@ -45,8 +45,8 @@ namespace Loki
}; };
#define ENABLE_NEW_FACTORY_CODE #define LOKI_ENABLE_NEW_FACTORY_CODE
#ifdef ENABLE_NEW_FACTORY_CODE #ifdef LOKI_ENABLE_NEW_FACTORY_CODE
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/* /*
@ -125,7 +125,7 @@ namespace Loki
}; };
template <typename AP, typename Id, typename P1 > template <typename AP, typename Id, typename P1 >
struct FactoryImpl<AP,Id, TYPELIST_1( P1 )> struct FactoryImpl<AP,Id, LOKI_TYPELIST_1( P1 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -133,7 +133,7 @@ namespace Loki
}; };
template<typename AP, typename Id, typename P1,typename P2 > template<typename AP, typename Id, typename P1,typename P2 >
struct FactoryImpl<AP, Id, TYPELIST_2( P1, P2 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_2( P1, P2 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -142,7 +142,7 @@ namespace Loki
}; };
template<typename AP, typename Id, typename P1,typename P2,typename P3 > template<typename AP, typename Id, typename P1,typename P2,typename P3 >
struct FactoryImpl<AP, Id, TYPELIST_3( P1, P2, P3 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_3( P1, P2, P3 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -152,7 +152,7 @@ namespace Loki
}; };
template<typename AP, typename Id, typename P1,typename P2,typename P3,typename P4 > template<typename AP, typename Id, typename P1,typename P2,typename P3,typename P4 >
struct FactoryImpl<AP, Id, TYPELIST_4( P1, P2, P3, P4 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_4( P1, P2, P3, P4 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -164,7 +164,7 @@ namespace Loki
template<typename AP, typename Id, template<typename AP, typename Id,
typename P1,typename P2,typename P3,typename P4,typename P5 > typename P1,typename P2,typename P3,typename P4,typename P5 >
struct FactoryImpl<AP, Id, TYPELIST_5( P1, P2, P3, P4, P5 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_5( P1, P2, P3, P4, P5 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -178,7 +178,7 @@ namespace Loki
template<typename AP, typename Id, template<typename AP, typename Id,
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6> typename P6>
struct FactoryImpl<AP, Id, TYPELIST_6( P1, P2, P3, P4, P5, P6 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_6( P1, P2, P3, P4, P5, P6 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -195,7 +195,7 @@ namespace Loki
template<typename AP, typename Id, template<typename AP, typename Id,
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7> typename P6,typename P7>
struct FactoryImpl<AP, Id, TYPELIST_7( P1, P2, P3, P4, P5, P6, P7 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_7( P1, P2, P3, P4, P5, P6, P7 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -213,7 +213,7 @@ namespace Loki
template<typename AP, typename Id, template<typename AP, typename Id,
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7,typename P8> typename P6,typename P7,typename P8>
struct FactoryImpl<AP, Id, TYPELIST_8( P1, P2, P3, P4, P5, P6, P7, P8 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_8( P1, P2, P3, P4, P5, P6, P7, P8 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -232,7 +232,7 @@ namespace Loki
template<typename AP, typename Id, template<typename AP, typename Id,
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7,typename P8,typename P9> typename P6,typename P7,typename P8,typename P9>
struct FactoryImpl<AP, Id, TYPELIST_9( P1, P2, P3, P4, P5, P6, P7, P8, P9 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_9( P1, P2, P3, P4, P5, P6, P7, P8, P9 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -252,7 +252,7 @@ namespace Loki
template<typename AP, typename Id, template<typename AP, typename Id,
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7,typename P8,typename P9,typename P10> typename P6,typename P7,typename P8,typename P9,typename P10>
struct FactoryImpl<AP, Id, TYPELIST_10( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_10( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -274,7 +274,7 @@ namespace Loki
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7,typename P8,typename P9,typename P10, typename P6,typename P7,typename P8,typename P9,typename P10,
typename P11> typename P11>
struct FactoryImpl<AP, Id, TYPELIST_11( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_11( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -298,7 +298,7 @@ namespace Loki
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7,typename P8,typename P9,typename P10, typename P6,typename P7,typename P8,typename P9,typename P10,
typename P11,typename P12> typename P11,typename P12>
struct FactoryImpl<AP, Id, TYPELIST_12( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_12( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -323,7 +323,7 @@ namespace Loki
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7,typename P8,typename P9,typename P10, typename P6,typename P7,typename P8,typename P9,typename P10,
typename P11,typename P12,typename P13> typename P11,typename P12,typename P13>
struct FactoryImpl<AP, Id, TYPELIST_13( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_13( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -349,7 +349,7 @@ namespace Loki
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7,typename P8,typename P9,typename P10, typename P6,typename P7,typename P8,typename P9,typename P10,
typename P11,typename P12,typename P13,typename P14> typename P11,typename P12,typename P13,typename P14>
struct FactoryImpl<AP, Id, TYPELIST_14( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_14( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -376,7 +376,7 @@ namespace Loki
typename P1,typename P2,typename P3,typename P4,typename P5, typename P1,typename P2,typename P3,typename P4,typename P5,
typename P6,typename P7,typename P8,typename P9,typename P10, typename P6,typename P7,typename P8,typename P9,typename P10,
typename P11,typename P12,typename P13,typename P14,typename P15 > typename P11,typename P12,typename P13,typename P14,typename P15 >
struct FactoryImpl<AP, Id, TYPELIST_15( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 )> struct FactoryImpl<AP, Id, LOKI_TYPELIST_15( P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 )>
: public FactoryImplBase : public FactoryImplBase
{ {
typedef typename TypeTraits<P1>::ParameterType Parm1; typedef typename TypeTraits<P1>::ParameterType Parm1;
@ -747,6 +747,9 @@ namespace Loki
#endif // FACTORY_INC_ #endif // FACTORY_INC_
// $Log$ // $Log$
// Revision 1.6 2005/09/26 07:33:04 syntheticpp
// move macros into LOKI_ namespace
//
// Revision 1.5 2005/07/31 14:23:24 syntheticpp // Revision 1.5 2005/07/31 14:23:24 syntheticpp
// invert new factory code macro logic to be ReferenceTest more compatible with noncc code // invert new factory code macro logic to be ReferenceTest more compatible with noncc code
// //

View file

@ -15,8 +15,8 @@
// Last update: June 20, 2001 // Last update: June 20, 2001
#ifndef FUNCTOR_INC_ #ifndef LOKI_FUNCTOR_INC_
#define FUNCTOR_INC_ #define LOKI_FUNCTOR_INC_
#include "Typelist.h" #include "Typelist.h"
#include "EmptyType.h" #include "EmptyType.h"
@ -70,11 +70,11 @@ namespace Loki
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// macro DEFINE_CLONE_FUNCTORIMPL // macro LOKI_DEFINE_CLONE_FUNCTORIMPL
// Implements the DoClone function for a functor implementation // Implements the DoClone function for a functor implementation
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define DEFINE_CLONE_FUNCTORIMPL(Cls) \ #define LOKI_DEFINE_CLONE_FUNCTORIMPL(Cls) \
virtual Cls* DoClone() const { return new Cls(*this); } virtual Cls* DoClone() const { return new Cls(*this); }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -87,7 +87,7 @@ namespace Loki
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename R, class TList, template <typename R, class TList,
template <class> class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL> template <class> class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>
class FunctorImpl; class FunctorImpl;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -110,7 +110,7 @@ namespace Loki
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename R, typename P1, template <class> class ThreadingModel> template <typename R, typename P1, template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_1(P1), ThreadingModel> class FunctorImpl<R, LOKI_TYPELIST_1(P1), ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
public: public:
@ -126,7 +126,7 @@ namespace Loki
template <typename R, typename P1, typename P2, template <typename R, typename P1, typename P2,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_2(P1, P2), ThreadingModel> class FunctorImpl<R, LOKI_TYPELIST_2(P1, P2), ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
public: public:
@ -143,7 +143,7 @@ namespace Loki
template <typename R, typename P1, typename P2, typename P3, template <typename R, typename P1, typename P2, typename P3,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_3(P1, P2, P3), ThreadingModel> class FunctorImpl<R, LOKI_TYPELIST_3(P1, P2, P3), ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
public: public:
@ -161,7 +161,7 @@ namespace Loki
template <typename R, typename P1, typename P2, typename P3, typename P4, template <typename R, typename P1, typename P2, typename P3, typename P4,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_4(P1, P2, P3, P4), ThreadingModel> class FunctorImpl<R, LOKI_TYPELIST_4(P1, P2, P3, P4), ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
public: public:
@ -181,7 +181,7 @@ namespace Loki
template <typename R, typename P1, typename P2, typename P3, typename P4, template <typename R, typename P1, typename P2, typename P3, typename P4,
typename P5, typename P5,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_5(P1, P2, P3, P4, P5), ThreadingModel> class FunctorImpl<R, LOKI_TYPELIST_5(P1, P2, P3, P4, P5), ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
public: public:
@ -202,7 +202,7 @@ namespace Loki
template <typename R, typename P1, typename P2, typename P3, typename P4, template <typename R, typename P1, typename P2, typename P3, typename P4,
typename P5, typename P6, typename P5, typename P6,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_6(P1, P2, P3, P4, P5, P6), ThreadingModel> class FunctorImpl<R, LOKI_TYPELIST_6(P1, P2, P3, P4, P5, P6), ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
public: public:
@ -224,7 +224,7 @@ namespace Loki
template <typename R, typename P1, typename P2, typename P3, typename P4, template <typename R, typename P1, typename P2, typename P3, typename P4,
typename P5, typename P6, typename P7, typename P5, typename P6, typename P7,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_7(P1, P2, P3, P4, P5, P6, P7), ThreadingModel> class FunctorImpl<R, LOKI_TYPELIST_7(P1, P2, P3, P4, P5, P6, P7), ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
public: public:
@ -248,7 +248,7 @@ namespace Loki
template <typename R, typename P1, typename P2, typename P3, typename P4, template <typename R, typename P1, typename P2, typename P3, typename P4,
typename P5, typename P6, typename P7, typename P8, typename P5, typename P6, typename P7, typename P8,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_8(P1, P2, P3, P4, P5, P6, P7, P8), class FunctorImpl<R, LOKI_TYPELIST_8(P1, P2, P3, P4, P5, P6, P7, P8),
ThreadingModel> ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
@ -274,7 +274,7 @@ namespace Loki
template <typename R, typename P1, typename P2, typename P3, typename P4, template <typename R, typename P1, typename P2, typename P3, typename P4,
typename P5, typename P6, typename P7, typename P8, typename P9, typename P5, typename P6, typename P7, typename P8, typename P9,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_9(P1, P2, P3, P4, P5, P6, P7, P8, P9), class FunctorImpl<R, LOKI_TYPELIST_9(P1, P2, P3, P4, P5, P6, P7, P8, P9),
ThreadingModel> ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
@ -302,7 +302,7 @@ namespace Loki
typename P5, typename P6, typename P7, typename P8, typename P9, typename P5, typename P6, typename P7, typename P8, typename P9,
typename P10, typename P10,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, TYPELIST_10(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), class FunctorImpl<R, LOKI_TYPELIST_10(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10),
ThreadingModel> ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
@ -332,7 +332,7 @@ namespace Loki
typename P10, typename P11, typename P10, typename P11,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, class FunctorImpl<R,
TYPELIST_11(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11), LOKI_TYPELIST_11(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11),
ThreadingModel> ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
@ -363,7 +363,7 @@ namespace Loki
typename P10, typename P11, typename P12, typename P10, typename P11, typename P12,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, class FunctorImpl<R,
TYPELIST_12(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12), LOKI_TYPELIST_12(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12),
ThreadingModel> ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
@ -395,7 +395,7 @@ namespace Loki
typename P10, typename P11, typename P12, typename P13, typename P10, typename P11, typename P12, typename P13,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, class FunctorImpl<R,
TYPELIST_13(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13), LOKI_TYPELIST_13(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13),
ThreadingModel> ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
{ {
@ -428,7 +428,7 @@ namespace Loki
typename P10, typename P11, typename P12, typename P13, typename P14, typename P10, typename P11, typename P12, typename P13, typename P14,
template <class> class ThreadingModel> template <class> class ThreadingModel>
class FunctorImpl<R, class FunctorImpl<R,
TYPELIST_14(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, LOKI_TYPELIST_14(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13,
P14), P14),
ThreadingModel> ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
@ -463,7 +463,7 @@ namespace Loki
typename P10, typename P11, typename P12, typename P13, typename P14, typename P10, typename P11, typename P12, typename P13, typename P14,
typename P15, template <class> class ThreadingModel> typename P15, template <class> class ThreadingModel>
class FunctorImpl<R, class FunctorImpl<R,
TYPELIST_15(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, LOKI_TYPELIST_15(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13,
P14, P15), P14, P15),
ThreadingModel> ThreadingModel>
: public Private::FunctorImplBase<R, ThreadingModel> : public Private::FunctorImplBase<R, ThreadingModel>
@ -521,7 +521,7 @@ namespace Loki
FunctorHandler(const Fun& fun) : f_(fun) {} FunctorHandler(const Fun& fun) : f_(fun) {}
DEFINE_CLONE_FUNCTORIMPL(FunctorHandler) LOKI_DEFINE_CLONE_FUNCTORIMPL(FunctorHandler)
// operator() implementations for up to 15 arguments // operator() implementations for up to 15 arguments
@ -630,7 +630,7 @@ namespace Loki
: pObj_(pObj), pMemFn_(pMemFn) : pObj_(pObj), pMemFn_(pMemFn)
{} {}
DEFINE_CLONE_FUNCTORIMPL(MemFunHandler) LOKI_DEFINE_CLONE_FUNCTORIMPL(MemFunHandler)
ResultType operator()() ResultType operator()()
{ return ((*pObj_).*pMemFn_)(); } { return ((*pObj_).*pMemFn_)(); }
@ -720,7 +720,7 @@ namespace Loki
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename R, class TList = NullType, template <typename R, class TList = NullType,
template<class> class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL> template<class> class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>
class Functor class Functor
{ {
public: public:
@ -910,7 +910,7 @@ namespace Loki
: f_(fun), b_(bound) : f_(fun), b_(bound)
{} {}
DEFINE_CLONE_FUNCTORIMPL(BinderFirst) LOKI_DEFINE_CLONE_FUNCTORIMPL(BinderFirst)
// operator() implementations for up to 15 arguments // operator() implementations for up to 15 arguments
@ -1027,7 +1027,7 @@ namespace Loki
Chainer(const Fun1& fun1, const Fun2& fun2) : f1_(fun1), f2_(fun2) {} Chainer(const Fun1& fun1, const Fun2& fun2) : f1_(fun1), f2_(fun2) {}
DEFINE_CLONE_FUNCTORIMPL(Chainer) LOKI_DEFINE_CLONE_FUNCTORIMPL(Chainer)
// operator() implementations for up to 15 arguments // operator() implementations for up to 15 arguments

View file

@ -15,8 +15,8 @@
// $Header: // $Header:
#ifndef HIERARCHYGENERATORS_INC_ #ifndef LOKI_HIERARCHYGENERATORS_INC_
#define HIERARCHYGENERATORS_INC_ #define LOKI_HIERARCHYGENERATORS_INC_
#include "Typelist.h" #include "Typelist.h"
#include "TypeTraits.h" #include "TypeTraits.h"
@ -44,10 +44,10 @@ namespace Loki
// The following type helps to overcome subtle flaw in the original // The following type helps to overcome subtle flaw in the original
// implementation of GenScatterHierarchy. // implementation of GenScatterHierarchy.
// The flaw is revealed when the input type list of GenScatterHierarchy // The flaw is revealed when the input type list of GenScatterHierarchy
// contains more then one element of the same type (e.g. TYPELIST_2(int, int)). // contains more then one element of the same type (e.g. LOKI_TYPELIST_2(int, int)).
// In this case GenScatterHierarchy will contain multiple bases of the same // In this case GenScatterHierarchy will contain multiple bases of the same
// type and some of them will not be reachable (per 10.3). // type and some of them will not be reachable (per 10.3).
// For example before the fix the first element of Tuple<TYPELIST_2(int, int)> // For example before the fix the first element of Tuple<LOKI_TYPELIST_2(int, int)>
// is not reachable in any way! // is not reachable in any way!
template<class, class> template<class, class>
struct ScatterHierarchyTag; struct ScatterHierarchyTag;

View file

@ -15,8 +15,8 @@
// Last update: June 20, 2001 // Last update: June 20, 2001
#ifndef LOKITYPEINFO_INC_ #ifndef LOKI_LOKITYPEINFO_INC_
#define LOKITYPEINFO_INC_ #define LOKI_LOKITYPEINFO_INC_
#include <typeinfo> #include <typeinfo>
#include <cassert> #include <cassert>

View file

@ -13,8 +13,8 @@
// without express or implied warranty. // without express or implied warranty.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef MULTIMETHODS_INC_ #ifndef LOKI_MULTIMETHODS_INC_
#define MULTIMETHODS_INC_ #define LOKI_MULTIMETHODS_INC_
#include "Typelist.h" #include "Typelist.h"
#include "LokiTypeInfo.h" #include "LokiTypeInfo.h"
@ -355,8 +355,8 @@ namespace Loki
class DispatcherBackend = BasicDispatcher> class DispatcherBackend = BasicDispatcher>
class FunctorDispatcher class FunctorDispatcher
{ {
typedef TYPELIST_2(BaseLhs&, BaseRhs&) ArgsList; typedef LOKI_TYPELIST_2(BaseLhs&, BaseRhs&) ArgsList;
typedef Functor<ResultType, ArgsList, DEFAULT_THREADING> FunctorType; typedef Functor<ResultType, ArgsList, LOKI_DEFAULT_THREADING> FunctorType;
DispatcherBackend<BaseLhs, BaseRhs, ResultType, FunctorType> backEnd_; DispatcherBackend<BaseLhs, BaseRhs, ResultType, FunctorType> backEnd_;

View file

@ -15,8 +15,8 @@
// Last update: November 22, 2001 // Last update: November 22, 2001
#ifndef NULLTYPE_INC_ #ifndef LOKI_NULLTYPE_INC_
#define NULLTYPE_INC_ #define LOKI_NULLTYPE_INC_
namespace Loki namespace Loki
{ {

View file

@ -15,8 +15,8 @@
// See Alexandrescu, Andrei: Type-safe Formatting, C/C++ Users Journal, Jul 2005 // See Alexandrescu, Andrei: Type-safe Formatting, C/C++ Users Journal, Jul 2005
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef SAFEFORMAT_H_ #ifndef LOKI_SAFEFORMAT_H_
#define SAFEFORMAT_H_ #define LOKI_SAFEFORMAT_H_
#include <cstdio> #include <cstdio>
#include <string> #include <string>
@ -68,20 +68,20 @@ struct PrintfState {
~PrintfState() { ~PrintfState() {
} }
#define PRINTF_STATE_FORWARD(type) \ #define LOKI_PRINTF_STATE_FORWARD(type) \
PrintfState& operator()(type par) {\ PrintfState& operator()(type par) {\
return (*this)(static_cast< unsigned long >(par)); \ return (*this)(static_cast< unsigned long >(par)); \
} }
PRINTF_STATE_FORWARD(bool) LOKI_PRINTF_STATE_FORWARD(bool)
PRINTF_STATE_FORWARD(char) LOKI_PRINTF_STATE_FORWARD(char)
PRINTF_STATE_FORWARD(signed char) LOKI_PRINTF_STATE_FORWARD(signed char)
PRINTF_STATE_FORWARD(unsigned char) LOKI_PRINTF_STATE_FORWARD(unsigned char)
PRINTF_STATE_FORWARD(short) LOKI_PRINTF_STATE_FORWARD(short)
PRINTF_STATE_FORWARD(unsigned short) LOKI_PRINTF_STATE_FORWARD(unsigned short)
PRINTF_STATE_FORWARD(int) LOKI_PRINTF_STATE_FORWARD(int)
PRINTF_STATE_FORWARD(unsigned) LOKI_PRINTF_STATE_FORWARD(unsigned)
PRINTF_STATE_FORWARD(long) LOKI_PRINTF_STATE_FORWARD(long)
// Print (or gobble in case of the "*" specifier) an int // Print (or gobble in case of the "*" specifier) an int
PrintfState& operator()(unsigned long i) { PrintfState& operator()(unsigned long i) {

View file

@ -13,8 +13,8 @@
// without express or implied warranty. // without express or implied warranty.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef SINGLETON_INC_ #ifndef LOKI_SINGLETON_INC_
#define SINGLETON_INC_ #define LOKI_SINGLETON_INC_
#include "Threads.h" #include "Threads.h"
#include <algorithm> #include <algorithm>
@ -24,15 +24,15 @@
#include <new> #include <new>
#ifdef _MSC_VER #ifdef _MSC_VER
#define C_CALLING_CONVENTION_QUALIFIER __cdecl #define LOKI_C_CALLING_CONVENTION_QUALIFIER __cdecl
#else #else
#define C_CALLING_CONVENTION_QUALIFIER #define LOKI_C_CALLING_CONVENTION_QUALIFIER
#endif #endif
namespace Loki namespace Loki
{ {
typedef void (C_CALLING_CONVENTION_QUALIFIER *atexit_pfn_t)(); typedef void (LOKI_C_CALLING_CONVENTION_QUALIFIER *atexit_pfn_t)();
namespace Private namespace Private
{ {
@ -94,7 +94,7 @@ namespace Loki
Destroyer destroyer_; Destroyer destroyer_;
}; };
void C_CALLING_CONVENTION_QUALIFIER AtExitFn(); // declaration needed below void LOKI_C_CALLING_CONVENTION_QUALIFIER AtExitFn(); // declaration needed below
} // namespace Private } // namespace Private
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -338,7 +338,7 @@ namespace Loki
typename T, typename T,
template <class> class CreationPolicy = CreateUsingNew, template <class> class CreationPolicy = CreateUsingNew,
template <class> class LifetimePolicy = DefaultLifetime, template <class> class LifetimePolicy = DefaultLifetime,
template <class> class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL template <class> class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL
> >
class SingletonHolder class SingletonHolder
{ {
@ -348,7 +348,7 @@ namespace Loki
private: private:
// Helpers // Helpers
static void MakeInstance(); static void MakeInstance();
static void C_CALLING_CONVENTION_QUALIFIER DestroySingleton(); static void LOKI_C_CALLING_CONVENTION_QUALIFIER DestroySingleton();
// Protection // Protection
SingletonHolder(); SingletonHolder();
@ -440,7 +440,7 @@ namespace Loki
template <class> class L, template <class> class L,
template <class> class M template <class> class M
> >
void C_CALLING_CONVENTION_QUALIFIER void LOKI_C_CALLING_CONVENTION_QUALIFIER
SingletonHolder<T, CreationPolicy, L, M>::DestroySingleton() SingletonHolder<T, CreationPolicy, L, M>::DestroySingleton()
{ {
assert(!destroyed_); assert(!destroyed_);

View file

@ -16,20 +16,20 @@
// $Header$ // $Header$
#ifndef SMALLOBJ_INC_ #ifndef LOKI_SMALLOBJ_INC_
#define SMALLOBJ_INC_ #define LOKI_SMALLOBJ_INC_
#include "Threads.h" #include "Threads.h"
#include "Singleton.h" #include "Singleton.h"
#include <cstddef> #include <cstddef>
#include <new> // needed for std::nothrow_t parameter. #include <new> // needed for std::nothrow_t parameter.
#ifndef DEFAULT_CHUNK_SIZE #ifndef LOKI_DEFAULT_CHUNK_SIZE
#define DEFAULT_CHUNK_SIZE 4096 #define LOKI_DEFAULT_CHUNK_SIZE 4096
#endif #endif
#ifndef MAX_SMALL_OBJECT_SIZE #ifndef LOKI_MAX_SMALL_OBJECT_SIZE
#define MAX_SMALL_OBJECT_SIZE 256 #define LOKI_MAX_SMALL_OBJECT_SIZE 256
#endif #endif
#ifndef LOKI_DEFAULT_OBJECT_ALIGNMENT #ifndef LOKI_DEFAULT_OBJECT_ALIGNMENT
@ -89,9 +89,9 @@ namespace Loki
template template
< <
template <class> class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL, template <class> class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL,
std::size_t chunkSize = DEFAULT_CHUNK_SIZE, std::size_t chunkSize = LOKI_DEFAULT_CHUNK_SIZE,
std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE, std::size_t maxSmallObjectSize = LOKI_MAX_SMALL_OBJECT_SIZE,
std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT, std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT,
template <class> class LifetimePolicy = Loki::NoDestroy template <class> class LifetimePolicy = Loki::NoDestroy
> >
@ -161,7 +161,7 @@ namespace Loki
class SmallObjectBase class SmallObjectBase
{ {
#if (MAX_SMALL_OBJECT_SIZE != 0) && (DEFAULT_CHUNK_SIZE != 0) && (LOKI_DEFAULT_OBJECT_ALIGNMENT != 0) #if (LOKI_MAX_SMALL_OBJECT_SIZE != 0) && (LOKI_DEFAULT_CHUNK_SIZE != 0) && (LOKI_DEFAULT_OBJECT_ALIGNMENT != 0)
/// Defines type of allocator. /// Defines type of allocator.
typedef AllocatorSingleton< ThreadingModel, chunkSize, typedef AllocatorSingleton< ThreadingModel, chunkSize,
@ -243,9 +243,9 @@ namespace Loki
template template
< <
template <class> class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL, template <class> class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL,
std::size_t chunkSize = DEFAULT_CHUNK_SIZE, std::size_t chunkSize = LOKI_DEFAULT_CHUNK_SIZE,
std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE, std::size_t maxSmallObjectSize = LOKI_MAX_SMALL_OBJECT_SIZE,
std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT, std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT,
template <class> class LifetimePolicy = Loki::NoDestroy template <class> class LifetimePolicy = Loki::NoDestroy
> >
@ -274,9 +274,9 @@ namespace Loki
template template
< <
template <class> class ThreadingModel = DEFAULT_THREADING_NO_OBJ_LEVEL, template <class> class ThreadingModel = LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL,
std::size_t chunkSize = DEFAULT_CHUNK_SIZE, std::size_t chunkSize = LOKI_DEFAULT_CHUNK_SIZE,
std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE, std::size_t maxSmallObjectSize = LOKI_MAX_SMALL_OBJECT_SIZE,
std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT, std::size_t objectAlignSize = LOKI_DEFAULT_OBJECT_ALIGNMENT,
template <class> class LifetimePolicy = Loki::NoDestroy template <class> class LifetimePolicy = Loki::NoDestroy
> >
@ -298,6 +298,9 @@ namespace Loki
// Nov. 26, 2004: re-implemented by Rich Sposato. // Nov. 26, 2004: re-implemented by Rich Sposato.
// //
// $Log$ // $Log$
// Revision 1.9 2005/09/26 07:33:04 syntheticpp
// move macros into LOKI_ namespace
//
// Revision 1.8 2005/09/09 00:24:59 rich_sposato // Revision 1.8 2005/09/09 00:24:59 rich_sposato
// Added functions to trim extra memory within allocator. Made a new_handler // Added functions to trim extra memory within allocator. Made a new_handler
// function for allocator. Added deallocator function for nothrow delete // function for allocator. Added deallocator function for nothrow delete

View file

@ -13,8 +13,8 @@
// without express or implied warranty. // without express or implied warranty.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef SMARTPTR_INC_ #ifndef LOKI_SMARTPTR_INC_
#define SMARTPTR_INC_ #define LOKI_SMARTPTR_INC_
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// IMPORTANT NOTE // IMPORTANT NOTE
@ -421,7 +421,7 @@ namespace Loki
// Make it depended on template parameter // Make it depended on template parameter
static const bool DependedFalse = sizeof(P*) == 0; static const bool DependedFalse = sizeof(P*) == 0;
STATIC_CHECK(DependedFalse, This_Policy_Disallows_Value_Copying); LOKI_STATIC_CHECK(DependedFalse, This_Policy_Disallows_Value_Copying);
} }
static bool Release(const P&) static bool Release(const P&)
@ -615,7 +615,7 @@ namespace Loki
// Make it depended on template parameter // Make it depended on template parameter
static const bool DependedFalse = sizeof(P*) == 0; static const bool DependedFalse = sizeof(P*) == 0;
STATIC_CHECK(DependedFalse, ERROR_This_Policy_Does_Not_Allow_Default_Initialization); LOKI_STATIC_CHECK(DependedFalse, ERROR_This_Policy_Does_Not_Allow_Default_Initialization);
} }
static void OnInit(const P& val) static void OnInit(const P& val)

View file

@ -1,29 +1,29 @@
#ifndef THREADS_H_ #ifndef LOKI_THREADS_H_
#define THREADS_H_ #define LOKI_THREADS_H_
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// macro DEFAULT_THREADING // macro LOKI_DEFAULT_THREADING
// Selects the default threading model for certain components of Loki // Selects the default threading model for certain components of Loki
// If you don't define it, it defaults to single-threaded // If you don't define it, it defaults to single-threaded
// All classes in Loki have configurable threading model; DEFAULT_THREADING // All classes in Loki have configurable threading model; LOKI_DEFAULT_THREADING
// affects only default template arguments // affects only default template arguments
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// $Header$ // $Header$
#if defined(_WIN32) && (defined(CLASS_LEVEL_THREADING) || defined(OBJECT_LEVEL_THREADING)) #if defined(_WIN32) && (defined(LOKI_CLASS_LEVEL_THREADING) || defined(LOKI_OBJECT_LEVEL_THREADING))
// threads only on windows // threads only on windows
#include <windows.h> #include <windows.h>
#define DEFAULT_THREADING_NO_OBJ_LEVEL ::Loki::ClassLevelLockable #define LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL ::Loki::ClassLevelLockable
#if defined(CLASS_LEVEL_THREADING) #if defined(LOKI_CLASS_LEVEL_THREADING)
#define DEFAULT_THREADING ::Loki::ClassLevelLockable #define LOKI_DEFAULT_THREADING ::Loki::ClassLevelLockable
#else #else
#define DEFAULT_THREADING ::Loki::ObjectLevelLockable #define LOKI_DEFAULT_THREADING ::Loki::ObjectLevelLockable
#endif #endif
#else #else
#define DEFAULT_THREADING ::Loki::SingleThreaded #define LOKI_DEFAULT_THREADING ::Loki::SingleThreaded
#define DEFAULT_THREADING_NO_OBJ_LEVEL ::Loki::SingleThreaded #define LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL ::Loki::SingleThreaded
#endif #endif
#include <cassert> #include <cassert>
@ -226,6 +226,9 @@ namespace Loki
#endif #endif
// $Log$ // $Log$
// Revision 1.13 2005/09/26 07:33:04 syntheticpp
// move macros into LOKI_ namespace
//
// Revision 1.12 2005/07/31 14:00:48 syntheticpp // Revision 1.12 2005/07/31 14:00:48 syntheticpp
// make object level threading possible // make object level threading possible
// //

View file

@ -15,8 +15,8 @@
// Last update, July 26, 2005 // Last update, July 26, 2005
#ifndef TYPEMANIP_INC_ #ifndef LOKI_TYPEMANIP_INC_
#define TYPEMANIP_INC_ #define LOKI_TYPEMANIP_INC_
namespace Loki namespace Loki
{ {
@ -264,7 +264,7 @@ struct SuperSubclassStrict<T, void>
// Deprecated: Use SuperSubclass class template instead. // Deprecated: Use SuperSubclass class template instead.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define SUPERSUBCLASS(T, U) \ #define LOKI_SUPERSUBCLASS(T, U) \
::Loki::SuperSubclass<T,U>::value ::Loki::SuperSubclass<T,U>::value
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -276,7 +276,7 @@ struct SuperSubclassStrict<T, void>
// Deprecated: Use SuperSubclassStrict class template instead. // Deprecated: Use SuperSubclassStrict class template instead.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define SUPERSUBCLASS_STRICT(T, U) \ #define LOKI_SUPERSUBCLASS_STRICT(T, U) \
::Loki::SuperSubclassStrict<T,U>::value ::Loki::SuperSubclassStrict<T,U>::value
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View file

@ -1,5 +1,5 @@
#ifndef TYPETRAITS_INC_ #ifndef LOKI_TYPETRAITS_INC_
#define TYPETRAITS_INC_ #define LOKI_TYPETRAITS_INC_
#include "Typelist.h" #include "Typelist.h"
@ -64,13 +64,13 @@ namespace Loki
namespace Private namespace Private
{ {
typedef TYPELIST_4(unsigned char, unsigned short int,unsigned int, unsigned long int) typedef LOKI_TYPELIST_4(unsigned char, unsigned short int,unsigned int, unsigned long int)
StdUnsignedInts; StdUnsignedInts;
typedef TYPELIST_4(signed char, short int,int, long int) typedef LOKI_TYPELIST_4(signed char, short int,int, long int)
StdSignedInts; StdSignedInts;
typedef TYPELIST_3(bool, char, wchar_t) typedef LOKI_TYPELIST_3(bool, char, wchar_t)
StdOtherInts; StdOtherInts;
typedef TYPELIST_3(float, double, long double) typedef LOKI_TYPELIST_3(float, double, long double)
StdFloats; StdFloats;
template <typename U> struct AddPointer template <typename U> struct AddPointer

View file

@ -16,333 +16,333 @@
// Last update: October 10, 2002 // Last update: October 10, 2002
//Reference //Reference
#ifndef TYPELIST_INC_ #ifndef LOKI_TYPELIST_INC_
#define TYPELIST_INC_ #define LOKI_TYPELIST_INC_
#include "NullType.h" #include "NullType.h"
#include "TypeManip.h" #include "TypeManip.h"
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// macros TYPELIST_1, TYPELIST_2, ... TYPELIST_50 // macros LOKI_TYPELIST_1, LOKI_TYPELIST_2, ... LOKI_TYPELIST_50
// Each takes a number of arguments equal to its numeric suffix // Each takes a number of arguments equal to its numeric suffix
// The arguments are type names. TYPELIST_NN generates a typelist containing // The arguments are type names. LOKI_TYPELIST_NN generates a typelist containing
// all types passed as arguments, in that order. // all types passed as arguments, in that order.
// Example: TYPELIST_2(char, int) generates a type containing char and int. // Example: LOKI_TYPELIST_2(char, int) generates a type containing char and int.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define TYPELIST_1(T1) ::Loki::Typelist<T1, ::Loki::NullType> #define LOKI_TYPELIST_1(T1) ::Loki::Typelist<T1, ::Loki::NullType>
#define TYPELIST_2(T1, T2) ::Loki::Typelist<T1, TYPELIST_1(T2) > #define LOKI_TYPELIST_2(T1, T2) ::Loki::Typelist<T1, LOKI_TYPELIST_1(T2) >
#define TYPELIST_3(T1, T2, T3) ::Loki::Typelist<T1, TYPELIST_2(T2, T3) > #define LOKI_TYPELIST_3(T1, T2, T3) ::Loki::Typelist<T1, LOKI_TYPELIST_2(T2, T3) >
#define TYPELIST_4(T1, T2, T3, T4) \ #define LOKI_TYPELIST_4(T1, T2, T3, T4) \
::Loki::Typelist<T1, TYPELIST_3(T2, T3, T4) > ::Loki::Typelist<T1, LOKI_TYPELIST_3(T2, T3, T4) >
#define TYPELIST_5(T1, T2, T3, T4, T5) \ #define LOKI_TYPELIST_5(T1, T2, T3, T4, T5) \
::Loki::Typelist<T1, TYPELIST_4(T2, T3, T4, T5) > ::Loki::Typelist<T1, LOKI_TYPELIST_4(T2, T3, T4, T5) >
#define TYPELIST_6(T1, T2, T3, T4, T5, T6) \ #define LOKI_TYPELIST_6(T1, T2, T3, T4, T5, T6) \
::Loki::Typelist<T1, TYPELIST_5(T2, T3, T4, T5, T6) > ::Loki::Typelist<T1, LOKI_TYPELIST_5(T2, T3, T4, T5, T6) >
#define TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \ #define LOKI_TYPELIST_7(T1, T2, T3, T4, T5, T6, T7) \
::Loki::Typelist<T1, TYPELIST_6(T2, T3, T4, T5, T6, T7) > ::Loki::Typelist<T1, LOKI_TYPELIST_6(T2, T3, T4, T5, T6, T7) >
#define TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \ #define LOKI_TYPELIST_8(T1, T2, T3, T4, T5, T6, T7, T8) \
::Loki::Typelist<T1, TYPELIST_7(T2, T3, T4, T5, T6, T7, T8) > ::Loki::Typelist<T1, LOKI_TYPELIST_7(T2, T3, T4, T5, T6, T7, T8) >
#define TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \ #define LOKI_TYPELIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9) \
::Loki::Typelist<T1, TYPELIST_8(T2, T3, T4, T5, T6, T7, T8, T9) > ::Loki::Typelist<T1, LOKI_TYPELIST_8(T2, T3, T4, T5, T6, T7, T8, T9) >
#define TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \ #define LOKI_TYPELIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) \
::Loki::Typelist<T1, TYPELIST_9(T2, T3, T4, T5, T6, T7, T8, T9, T10) > ::Loki::Typelist<T1, LOKI_TYPELIST_9(T2, T3, T4, T5, T6, T7, T8, T9, T10) >
#define TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \ #define LOKI_TYPELIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
::Loki::Typelist<T1, TYPELIST_10(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) > ::Loki::Typelist<T1, LOKI_TYPELIST_10(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) >
#define TYPELIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \ #define LOKI_TYPELIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \
::Loki::Typelist<T1, TYPELIST_11(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_11(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12) > T11, T12) >
#define TYPELIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \ #define LOKI_TYPELIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
::Loki::Typelist<T1, TYPELIST_12(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_12(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13) > T11, T12, T13) >
#define TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14) \ T11, T12, T13, T14) \
::Loki::Typelist<T1, TYPELIST_13(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_13(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14) > T11, T12, T13, T14) >
#define TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15) \ T11, T12, T13, T14, T15) \
::Loki::Typelist<T1, TYPELIST_14(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_14(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15) > T11, T12, T13, T14, T15) >
#define TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_16(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16) \ T11, T12, T13, T14, T15, T16) \
::Loki::Typelist<T1, TYPELIST_15(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_15(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16) > T11, T12, T13, T14, T15, T16) >
#define TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_17(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17) \ T11, T12, T13, T14, T15, T16, T17) \
::Loki::Typelist<T1, TYPELIST_16(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_16(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17) > T11, T12, T13, T14, T15, T16, T17) >
#define TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_18(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18) \ T11, T12, T13, T14, T15, T16, T17, T18) \
::Loki::Typelist<T1, TYPELIST_17(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_17(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18) > T11, T12, T13, T14, T15, T16, T17, T18) >
#define TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_19(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19) \ T11, T12, T13, T14, T15, T16, T17, T18, T19) \
::Loki::Typelist<T1, TYPELIST_18(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_18(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19) > T11, T12, T13, T14, T15, T16, T17, T18, T19) >
#define TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_20(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) \
::Loki::Typelist<T1, TYPELIST_19(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_19(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) > T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) >
#define TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_21(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) \
::Loki::Typelist<T1, TYPELIST_20(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_20(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) > T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) >
#define TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_22(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) \
::Loki::Typelist<T1, TYPELIST_21(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_21(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) > T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) >
#define TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_23(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) \
::Loki::Typelist<T1, TYPELIST_22(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_22(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) > T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) >
#define TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_24(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) \
::Loki::Typelist<T1, TYPELIST_23(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_23(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) > T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) >
#define TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_25(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25) \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25) \
::Loki::Typelist<T1, TYPELIST_24(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_24(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25) > T21, T22, T23, T24, T25) >
#define TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_26(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26) \ T21, T22, T23, T24, T25, T26) \
::Loki::Typelist<T1, TYPELIST_25(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_25(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26) > T21, T22, T23, T24, T25, T26) >
#define TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_27(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27) \ T21, T22, T23, T24, T25, T26, T27) \
::Loki::Typelist<T1, TYPELIST_26(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_26(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27) > T21, T22, T23, T24, T25, T26, T27) >
#define TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_28(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28) \ T21, T22, T23, T24, T25, T26, T27, T28) \
::Loki::Typelist<T1, TYPELIST_27(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_27(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28) > T21, T22, T23, T24, T25, T26, T27, T28) >
#define TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_29(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29) \ T21, T22, T23, T24, T25, T26, T27, T28, T29) \
::Loki::Typelist<T1, TYPELIST_28(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_28(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29) > T21, T22, T23, T24, T25, T26, T27, T28, T29) >
#define TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_30(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) \
::Loki::Typelist<T1, TYPELIST_29(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_29(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) > T21, T22, T23, T24, T25, T26, T27, T28, T29, T30) >
#define TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_31(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) \
::Loki::Typelist<T1, TYPELIST_30(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_30(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) > T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31) >
#define TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_32(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) \
::Loki::Typelist<T1, TYPELIST_31(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_31(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) > T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32) >
#define TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_33(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) \
::Loki::Typelist<T1, TYPELIST_32(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_32(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) > T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33) >
#define TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_34(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) \
::Loki::Typelist<T1, TYPELIST_33(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_33(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) > T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32, T33, T34) >
#define TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_35(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35) \ T31, T32, T33, T34, T35) \
::Loki::Typelist<T1, TYPELIST_34(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_34(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35) > T31, T32, T33, T34, T35) >
#define TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_36(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36) \ T31, T32, T33, T34, T35, T36) \
::Loki::Typelist<T1, TYPELIST_35(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_35(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36) > T31, T32, T33, T34, T35, T36) >
#define TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_37(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37) \ T31, T32, T33, T34, T35, T36, T37) \
::Loki::Typelist<T1, TYPELIST_36(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_36(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37) > T31, T32, T33, T34, T35, T36, T37) >
#define TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_38(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38) \ T31, T32, T33, T34, T35, T36, T37, T38) \
::Loki::Typelist<T1, TYPELIST_37(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_37(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38) > T31, T32, T33, T34, T35, T36, T37, T38) >
#define TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_39(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39) \ T31, T32, T33, T34, T35, T36, T37, T38, T39) \
::Loki::Typelist<T1, TYPELIST_38(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_38(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39) > T31, T32, T33, T34, T35, T36, T37, T38, T39) >
#define TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_40(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) \
::Loki::Typelist<T1, TYPELIST_39(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_39(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) > T31, T32, T33, T34, T35, T36, T37, T38, T39, T40) >
#define TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_41(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) \
::Loki::Typelist<T1, TYPELIST_40(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_40(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) > T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41) >
#define TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_42(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) \
::Loki::Typelist<T1, TYPELIST_41(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_41(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) > T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42) >
#define TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_43(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) \
::Loki::Typelist<T1, TYPELIST_42(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_42(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) > T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43) >
#define TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_44(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) \
::Loki::Typelist<T1, TYPELIST_43(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_43(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) > T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44) >
#define TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_45(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45) \ T41, T42, T43, T44, T45) \
::Loki::Typelist<T1, TYPELIST_44(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_44(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45) > T41, T42, T43, T44, T45) >
#define TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_46(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46) \ T41, T42, T43, T44, T45, T46) \
::Loki::Typelist<T1, TYPELIST_45(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_45(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46) > T41, T42, T43, T44, T45, T46) >
#define TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_47(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46, T47) \ T41, T42, T43, T44, T45, T46, T47) \
::Loki::Typelist<T1, TYPELIST_46(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_46(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46, T47) > T41, T42, T43, T44, T45, T46, T47) >
#define TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_48(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46, T47, T48) \ T41, T42, T43, T44, T45, T46, T47, T48) \
::Loki::Typelist<T1, TYPELIST_47(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_47(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46, T47, T48) > T41, T42, T43, T44, T45, T46, T47, T48) >
#define TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_49(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46, T47, T48, T49) \ T41, T42, T43, T44, T45, T46, T47, T48, T49) \
::Loki::Typelist<T1, TYPELIST_48(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_48(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46, T47, T48, T49) > T41, T42, T43, T44, T45, T46, T47, T48, T49) >
#define TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \ #define LOKI_TYPELIST_50(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) \ T41, T42, T43, T44, T45, T46, T47, T48, T49, T50) \
::Loki::Typelist<T1, TYPELIST_49(T2, T3, T4, T5, T6, T7, T8, T9, T10, \ ::Loki::Typelist<T1, LOKI_TYPELIST_49(T2, T3, T4, T5, T6, T7, T8, T9, T10, \
T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \ T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, \
T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \ T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, \
T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \ T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, \
@ -353,7 +353,7 @@ namespace Loki
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// class template Typelist // class template Typelist
// The building block of typelists of any length // The building block of typelists of any length
// Use it through the TYPELIST_NN macros // Use it through the LOKI_TYPELIST_NN macros
// Defines nested types: // Defines nested types:
// Head (first element, a non-typelist type by convention) // Head (first element, a non-typelist type by convention)
// Tail (second element, can be another typelist) // Tail (second element, can be another typelist)
@ -537,7 +537,7 @@ namespace Loki
template <class T> struct Append<NullType, T> template <class T> struct Append<NullType, T>
{ {
typedef TYPELIST_1(T) Result; typedef LOKI_TYPELIST_1(T) Result;
}; };
template <class Head, class Tail> template <class Head, class Tail>
@ -781,7 +781,7 @@ namespace Loki
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Change log: // Change log:
// June 09, 2001: Fix bug in parameter list of macros TYPELIST_23 to TYPELIST_27 // June 09, 2001: Fix bug in parameter list of macros LOKI_TYPELIST_23 to LOKI_TYPELIST_27
// (credit due to Dave Taylor) // (credit due to Dave Taylor)
// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
// November 22, 2001: fixed bug in DerivedToFront // November 22, 2001: fixed bug in DerivedToFront
@ -789,7 +789,7 @@ namespace Loki
// Adam Wilkshire; // Adam Wilkshire;
// Friedrik Hedman who fixed the bug but didn't send the fix; // Friedrik Hedman who fixed the bug but didn't send the fix;
// Kevin Cline who sent the first actual fix) // Kevin Cline who sent the first actual fix)
// May 13, 2002: TYPELIST_46 called TYPELIST_45 with only 44 parameters. // May 13, 2002: LOKI_TYPELIST_46 called LOKI_TYPELIST_45 with only 44 parameters.
// Credit due to Robert Minsk // Credit due to Robert Minsk
// September 16, 2002: Changed MostDerived to use the new SuperSubclass template // September 16, 2002: Changed MostDerived to use the new SuperSubclass template
// (rather than the SUPERSUBCLASS macro). // (rather than the SUPERSUBCLASS macro).
@ -799,4 +799,4 @@ namespace Loki
// Oct 10, 2002: added MakeTypelist (SGB/MKH) // Oct 10, 2002: added MakeTypelist (SGB/MKH)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#endif // TYPELIST_INC_ #endif // LOKI_TYPELIST_INC_

View file

@ -15,8 +15,8 @@
// Last update: June 20, 2001 // Last update: June 20, 2001
#ifndef VISITOR_INC_ #ifndef LOKI_VISITOR_INC_
#define VISITOR_INC_ #define LOKI_VISITOR_INC_
#include "Typelist.h" #include "Typelist.h"
#include "HierarchyGenerators.h" #include "HierarchyGenerators.h"
@ -55,7 +55,7 @@ namespace Loki
// //
// class SomeVisitor : // class SomeVisitor :
// public BaseVisitor // required // public BaseVisitor // required
// public Visitor<TYPELIST_2(RasterBitmap, Paragraph)>, // public Visitor<LOKI_TYPELIST_2(RasterBitmap, Paragraph)>,
// public Visitor<Paragraph> // public Visitor<Paragraph>
// { // {
// public: // public:
@ -157,7 +157,7 @@ struct DefaultCatchAll
// deriving it from BaseVisitable<R> // deriving it from BaseVisitable<R>
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define DEFINE_VISITABLE() \ #define LOKI_DEFINE_VISITABLE() \
virtual ReturnType Accept(::Loki::BaseVisitor& guest) \ virtual ReturnType Accept(::Loki::BaseVisitor& guest) \
{ return AcceptImpl(*this, guest); } { return AcceptImpl(*this, guest); }
@ -183,11 +183,11 @@ struct DefaultCatchAll
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// macro DEFINE_CYCLIC_VISITABLE // macro LOKI_DEFINE_CYCLIC_VISITABLE
// Put it in every class that you want to make visitable by a cyclic visitor // Put it in every class that you want to make visitable by a cyclic visitor
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define DEFINE_CYCLIC_VISITABLE(SomeVisitor) \ #define LOKI_DEFINE_CYCLIC_VISITABLE(SomeVisitor) \
virtual SomeVisitor::ReturnType Accept(SomeVisitor& guest) \ virtual SomeVisitor::ReturnType Accept(SomeVisitor& guest) \
{ return guest.GenericVisit(*this); } { return guest.GenericVisit(*this); }

View file

@ -15,8 +15,8 @@
// Last update: June 20, 2001 // Last update: June 20, 2001
#ifndef STATIC_CHECK_INC_ #ifndef LOKI_STATIC_CHECK_INC_
#define STATIC_CHECK_INC_ #define LOKI_STATIC_CHECK_INC_
namespace Loki namespace Loki
{ {
@ -37,7 +37,7 @@ namespace Loki
// If expr is zero, id will appear in a compile-time error message. // If expr is zero, id will appear in a compile-time error message.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define STATIC_CHECK(expr, msg) \ #define LOKI_STATIC_CHECK(expr, msg) \
{ Loki::CompileTimeError<((expr) != 0)> ERROR_##msg; (void)ERROR_##msg; } { Loki::CompileTimeError<((expr) != 0)> ERROR_##msg; (void)ERROR_##msg; }

View file

@ -27,7 +27,7 @@ unsigned int Loki::Private::elements = 0;
// Ensures proper destruction of objects with longevity // Ensures proper destruction of objects with longevity
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void C_CALLING_CONVENTION_QUALIFIER Loki::Private::AtExitFn() void LOKI_C_CALLING_CONVENTION_QUALIFIER Loki::Private::AtExitFn()
{ {
assert(elements > 0 && pTrackerArray != 0); assert(elements > 0 && pTrackerArray != 0);
// Pick the element at the top of the stack // Pick the element at the top of the stack

View file

@ -52,7 +52,7 @@ PFactoryNull;
typedef SingletonHolder typedef SingletonHolder
< <
Factory< AbstractProduct, int, TYPELIST_2( int, int ) > Factory< AbstractProduct, int, LOKI_TYPELIST_2( int, int ) >
> >
PFactory; PFactory;
@ -136,12 +136,12 @@ public:
// get creator functions on runntime // get creator functions on runntime
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
typedef Functor<Product*,TYPELIST_2(int,int)> CreateFunctor; typedef Functor<Product*,LOKI_TYPELIST_2(int,int)> CreateFunctor;
typedef typedef
SingletonHolder SingletonHolder
< <
Factory< AbstractProduct, int,TYPELIST_3(CreateFunctor,int,int) > Factory< AbstractProduct, int,LOKI_TYPELIST_3(CreateFunctor,int,int) >
> >
PFactoryFunctorParm; PFactoryFunctorParm;
@ -226,6 +226,9 @@ int main(int argc, char *argv[])
} }
// $Log$ // $Log$
// Revision 1.2 2005/09/26 07:33:05 syntheticpp
// move macros into LOKI_ namespace
//
// Revision 1.1 2005/09/24 16:10:14 syntheticpp // Revision 1.1 2005/09/24 16:10:14 syntheticpp
// move Factory example // move Factory example
// //

View file

@ -35,13 +35,13 @@ class BadSoldier : public Soldier {};
class BadMonster : public Monster {}; class BadMonster : public Monster {};
class BadSuperMonster : public SuperMonster {}; class BadSuperMonster : public SuperMonster {};
typedef Loki::AbstractFactory<TYPELIST_3(Soldier, Monster, SuperMonster)> AbstractEnemyFactory; typedef Loki::AbstractFactory<LOKI_TYPELIST_3(Soldier, Monster, SuperMonster)> AbstractEnemyFactory;
typedef Loki::ConcreteFactory<AbstractEnemyFactory, Loki::OpNewFactoryUnit, typedef Loki::ConcreteFactory<AbstractEnemyFactory, Loki::OpNewFactoryUnit,
TYPELIST_3(SillySoldier, SillyMonster, SillySuperMonster)> EasyLevelEnemyFactory; LOKI_TYPELIST_3(SillySoldier, SillyMonster, SillySuperMonster)> EasyLevelEnemyFactory;
typedef Loki::ConcreteFactory<AbstractEnemyFactory, Loki::OpNewFactoryUnit, typedef Loki::ConcreteFactory<AbstractEnemyFactory, Loki::OpNewFactoryUnit,
TYPELIST_3(BadSoldier, BadMonster, BadSuperMonster)> HardLevelEnemyFactory; LOKI_TYPELIST_3(BadSoldier, BadMonster, BadSuperMonster)> HardLevelEnemyFactory;
class AbstractFactoryTest : public Test class AbstractFactoryTest : public Test
{ {

View file

@ -185,90 +185,90 @@ namespace FactoryTestParmPrivate
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_1( int ) > Factory< AbstractProduct, int, LOKI_TYPELIST_1( int ) >
>Factory1; >Factory1;
typedef SingletonHolder< typedef SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_2( int, int ) > Factory< AbstractProduct, int, LOKI_TYPELIST_2( int, int ) >
>Factory2; >Factory2;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_3( int, int, int ) > Factory< AbstractProduct, int, LOKI_TYPELIST_3( int, int, int ) >
>Factory3; >Factory3;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_4( int, int, int, int ) > Factory< AbstractProduct, int, LOKI_TYPELIST_4( int, int, int, int ) >
>Factory4; >Factory4;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_5( int, int, int, int, int ) > Factory< AbstractProduct, int, LOKI_TYPELIST_5( int, int, int, int, int ) >
>Factory5; >Factory5;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_6( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_6( int, int, int, int, int,
int ) > int ) >
>Factory6; >Factory6;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_7( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_7( int, int, int, int, int,
int, int ) > int, int ) >
>Factory7; >Factory7;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_8( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_8( int, int, int, int, int,
int, int, int ) > int, int, int ) >
>Factory8; >Factory8;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_9( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_9( int, int, int, int, int,
int, int, int, int ) > int, int, int, int ) >
>Factory9; >Factory9;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_10( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_10( int, int, int, int, int,
int, int, int, int, int ) > int, int, int, int, int ) >
>Factory10; >Factory10;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_11( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_11( int, int, int, int, int,
int, int, int, int, int, int, int, int, int, int,
int ) > int ) >
>Factory11; >Factory11;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_12( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_12( int, int, int, int, int,
int, int, int, int, int, int, int, int, int, int,
int, int ) > int, int ) >
>Factory12; >Factory12;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_13( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_13( int, int, int, int, int,
int, int, int, int, int, int, int, int, int, int,
int, int, int ) > int, int, int ) >
>Factory13; >Factory13;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_14( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_14( int, int, int, int, int,
int, int, int, int, int, int, int, int, int, int,
int, int, int, int ) > int, int, int, int ) >
>Factory14; >Factory14;
typedef typedef
SingletonHolder< SingletonHolder<
Factory< AbstractProduct, int, TYPELIST_15( int, int, int, int, int, Factory< AbstractProduct, int, LOKI_TYPELIST_15( int, int, int, int, int,
int, int, int, int, int, int, int, int, int, int,
int, int, int, int, int ) > int, int, int, int, int ) >
>Factory15; >Factory15;
@ -419,6 +419,9 @@ public:
// $Log$ // $Log$
// Revision 1.5 2005/09/26 07:33:05 syntheticpp
// move macros into LOKI_ namespace
//
// Revision 1.4 2005/09/24 15:25:20 syntheticpp // Revision 1.4 2005/09/24 15:25:20 syntheticpp
// ove RegressionTest // ove RegressionTest
// //

View file

@ -37,10 +37,10 @@ public:
TestFunctor testFunctor; TestFunctor testFunctor;
TestClass testClass; TestClass testClass;
Functor<void,TYPELIST_1(bool &)> function(testFunction); Functor<void,LOKI_TYPELIST_1(bool &)> function(testFunction);
Functor<void,TYPELIST_1(bool &)> functor(testFunctor); Functor<void,LOKI_TYPELIST_1(bool &)> functor(testFunctor);
Functor<void,TYPELIST_1(bool &)> classFunctor(&testClass,&TestClass::member); Functor<void,LOKI_TYPELIST_1(bool &)> classFunctor(&testClass,&TestClass::member);
Functor<void,TYPELIST_1(bool &)> functorCopy(function); Functor<void,LOKI_TYPELIST_1(bool &)> functorCopy(function);
Functor<void,NullType> bindFunctor(BindFirst(function,testResult)); Functor<void,NullType> bindFunctor(BindFirst(function,testResult));
Functor<void> chainFunctor(Chain(bindFunctor,bindFunctor)); Functor<void> chainFunctor(Chain(bindFunctor,bindFunctor));

View file

@ -1,21 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 7.00 Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "MSVCUnitTest.vcproj", "{79729949-F144-4098-BFE9-B6320E6AC3F6}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "MSVCUnitTest.vcproj", "{79729949-F144-4098-BFE9-B6320E6AC3F6}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfiguration) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
ConfigName.0 = Debug Debug|Win32 = Debug|Win32
ConfigName.1 = Release Release|Win32 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{79729949-F144-4098-BFE9-B6320E6AC3F6}.Debug|Win32.ActiveCfg = Debug|Win32
{79729949-F144-4098-BFE9-B6320E6AC3F6}.Debug|Win32.Build.0 = Debug|Win32
{79729949-F144-4098-BFE9-B6320E6AC3F6}.Release|Win32.ActiveCfg = Release|Win32
{79729949-F144-4098-BFE9-B6320E6AC3F6}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution GlobalSection(SolutionProperties) = preSolution
{79729949-F144-4098-BFE9-B6320E6AC3F6}.Debug.ActiveCfg = Debug|Win32 HideSolutionNode = FALSE
{79729949-F144-4098-BFE9-B6320E6AC3F6}.Debug.Build.0 = Debug|Win32
{79729949-F144-4098-BFE9-B6320E6AC3F6}.Release.ActiveCfg = Release|Win32
{79729949-F144-4098-BFE9-B6320E6AC3F6}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View file

@ -1,118 +1,200 @@
<?xml version="1.0" encoding = "Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="7.00" Version="8,00"
Name="UnitTest" Name="UnitTest"
ProjectGUID="{79729949-F144-4098-BFE9-B6320E6AC3F6}" ProjectGUID="{79729949-F144-4098-BFE9-B6320E6AC3F6}"
Keyword="Win32Proj"> Keyword="Win32Proj"
SignManifests="true"
>
<Platforms> <Platforms>
<Platform <Platform
Name="Win32"/> Name="Win32"
/>
</Platforms> </Platforms>
<ToolFiles>
</ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="Debug" OutputDirectory="Debug"
IntermediateDirectory="Debug" IntermediateDirectory="Debug"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2"> InheritedPropertySheets="UpgradeFromVC70.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../../include/noncc" AdditionalIncludeDirectories="../../include/noncc"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="1"
BufferSecurityCheck="TRUE" BufferSecurityCheck="true"
TreatWChar_tAsBuiltInType="TRUE" TreatWChar_tAsBuiltInType="true"
ForceConformanceInForLoopScope="TRUE" ForceConformanceInForLoopScope="true"
RuntimeTypeInfo="TRUE" RuntimeTypeInfo="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"/> DebugInformationFormat="4"
/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
OutputFile="$(OutDir)/UnitTest.exe" OutputFile="$(OutDir)/UnitTest.exe"
LinkIncremental="2" LinkIncremental="2"
GenerateDebugInformation="TRUE" GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/UnitTest.pdb" ProgramDatabaseFile="$(OutDir)/UnitTest.pdb"
SubSystem="1" SubSystem="1"
TargetMachine="1"/> TargetMachine="1"
/>
<Tool <Tool
Name="VCMIDLTool"/> Name="VCALinkTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool"/> Name="VCManifestTool"
/>
<Tool <Tool
Name="VCPreBuildEventTool"/> Name="VCXDCMakeTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool"/> Name="VCBscMakeTool"
/>
<Tool <Tool
Name="VCResourceCompilerTool"/> Name="VCFxCopTool"
/>
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool"/> Name="VCAppVerifierTool"
/>
<Tool <Tool
Name="VCWebDeploymentTool"/> Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="Release" OutputDirectory="Release"
IntermediateDirectory="Release" IntermediateDirectory="Release"
ConfigurationType="1" ConfigurationType="1"
CharacterSet="2"> InheritedPropertySheets="UpgradeFromVC70.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
AdditionalIncludeDirectories="../../include/noncc"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
OmitFramePointers="TRUE" OmitFramePointers="true"
AdditionalIncludeDirectories="../../include/noncc"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="TRUE" StringPooling="true"
RuntimeLibrary="4" RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="TRUE" Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"/> DebugInformationFormat="3"
/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
OutputFile="$(OutDir)/UnitTest.exe" OutputFile="$(OutDir)/UnitTest.exe"
LinkIncremental="1" LinkIncremental="1"
GenerateDebugInformation="TRUE" GenerateDebugInformation="true"
SubSystem="1" SubSystem="1"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1"/> TargetMachine="1"
/>
<Tool <Tool
Name="VCMIDLTool"/> Name="VCALinkTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool"/> Name="VCManifestTool"
/>
<Tool <Tool
Name="VCPreBuildEventTool"/> Name="VCXDCMakeTool"
/>
<Tool <Tool
Name="VCPreLinkEventTool"/> Name="VCBscMakeTool"
/>
<Tool <Tool
Name="VCResourceCompilerTool"/> Name="VCFxCopTool"
/>
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool"/> Name="VCAppVerifierTool"
/>
<Tool <Tool
Name="VCWebDeploymentTool"/> Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration> </Configuration>
</Configurations> </Configurations>
<References>
</References>
<Files> <Files>
<File <File
RelativePath="LokiTest.h"> RelativePath="LokiTest.h"
>
</File> </File>
<File <File
RelativePath="Test.cpp"> RelativePath="Test.cpp"
>
</File> </File>
<File <File
RelativePath="UnitTest.h"> RelativePath="UnitTest.h"
>
</File> </File>
</Files> </Files>
<Globals> <Globals>

View file

@ -187,7 +187,7 @@ public:
private: private:
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, AssertCheck, DefaultSPStorage> p0; typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, AssertCheck, DefaultSPStorage> p0;
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, AssertCheck, DefaultSPStorage> p1; typedef SmartPtr<TestClass, RefCounted, DisallowConversion, AssertCheck, DefaultSPStorage> p1;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
DisallowConversion, AssertCheck, DefaultSPStorage> p2; DisallowConversion, AssertCheck, DefaultSPStorage> p2;
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, AssertCheck, DefaultSPStorage> p3; typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, AssertCheck, DefaultSPStorage> p3;
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, AssertCheck, DefaultSPStorage> p4; typedef SmartPtr<TestClass, RefLinked, DisallowConversion, AssertCheck, DefaultSPStorage> p4;
@ -197,7 +197,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, AssertCheck, DefaultSPStorage> p8; typedef SmartPtr<TestClass, DeepCopy, AllowConversion, AssertCheck, DefaultSPStorage> p8;
typedef SmartPtr<TestClass, RefCounted, AllowConversion, AssertCheck, DefaultSPStorage> p9; typedef SmartPtr<TestClass, RefCounted, AllowConversion, AssertCheck, DefaultSPStorage> p9;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
AllowConversion, AssertCheck, DefaultSPStorage> p10; AllowConversion, AssertCheck, DefaultSPStorage> p10;
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, AssertCheck, DefaultSPStorage> p11; typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, AssertCheck, DefaultSPStorage> p11;
typedef SmartPtr<TestClass, RefLinked, AllowConversion, AssertCheck, DefaultSPStorage> p12; typedef SmartPtr<TestClass, RefLinked, AllowConversion, AssertCheck, DefaultSPStorage> p12;
@ -207,7 +207,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p16; typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p16;
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p17; typedef SmartPtr<TestClass, RefCounted, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p17;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
DisallowConversion, AssertCheckStrict, DefaultSPStorage> p18; DisallowConversion, AssertCheckStrict, DefaultSPStorage> p18;
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p19; typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p19;
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p20; typedef SmartPtr<TestClass, RefLinked, DisallowConversion, AssertCheckStrict, DefaultSPStorage> p20;
@ -217,7 +217,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, AssertCheckStrict, DefaultSPStorage> p24; typedef SmartPtr<TestClass, DeepCopy, AllowConversion, AssertCheckStrict, DefaultSPStorage> p24;
typedef SmartPtr<TestClass, RefCounted, AllowConversion, AssertCheckStrict, DefaultSPStorage> p25; typedef SmartPtr<TestClass, RefCounted, AllowConversion, AssertCheckStrict, DefaultSPStorage> p25;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
AllowConversion, AssertCheckStrict, DefaultSPStorage> p26; AllowConversion, AssertCheckStrict, DefaultSPStorage> p26;
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, AssertCheckStrict, DefaultSPStorage> p27; typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, AssertCheckStrict, DefaultSPStorage> p27;
typedef SmartPtr<TestClass, RefLinked, AllowConversion, AssertCheckStrict, DefaultSPStorage> p28; typedef SmartPtr<TestClass, RefLinked, AllowConversion, AssertCheckStrict, DefaultSPStorage> p28;
@ -227,7 +227,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNullStatic, DefaultSPStorage> p40; typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNullStatic, DefaultSPStorage> p40;
typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNullStatic, DefaultSPStorage> p41; typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNullStatic, DefaultSPStorage> p41;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
AllowConversion, RejectNullStatic, DefaultSPStorage> p42; AllowConversion, RejectNullStatic, DefaultSPStorage> p42;
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNullStatic, DefaultSPStorage> p43; typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNullStatic, DefaultSPStorage> p43;
typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNullStatic, DefaultSPStorage> p44; typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNullStatic, DefaultSPStorage> p44;
@ -237,7 +237,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNullStatic, DefaultSPStorage> p48; typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNullStatic, DefaultSPStorage> p48;
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNullStatic, DefaultSPStorage> p49; typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNullStatic, DefaultSPStorage> p49;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
DisallowConversion, RejectNullStatic, DefaultSPStorage> p50; DisallowConversion, RejectNullStatic, DefaultSPStorage> p50;
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNullStatic, DefaultSPStorage> p51; typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNullStatic, DefaultSPStorage> p51;
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNullStatic, DefaultSPStorage> p52; typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNullStatic, DefaultSPStorage> p52;
@ -247,7 +247,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNull, DefaultSPStorage> p56; typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNull, DefaultSPStorage> p56;
typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNull, DefaultSPStorage> p57; typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNull, DefaultSPStorage> p57;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
AllowConversion, RejectNull, DefaultSPStorage> p58; AllowConversion, RejectNull, DefaultSPStorage> p58;
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNull, DefaultSPStorage> p59; typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNull, DefaultSPStorage> p59;
typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNull, DefaultSPStorage> p60; typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNull, DefaultSPStorage> p60;
@ -257,7 +257,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNull, DefaultSPStorage> p64; typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNull, DefaultSPStorage> p64;
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNull, DefaultSPStorage> p65; typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNull, DefaultSPStorage> p65;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
DisallowConversion, RejectNull, DefaultSPStorage> p66; DisallowConversion, RejectNull, DefaultSPStorage> p66;
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNull, DefaultSPStorage> p67; typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNull, DefaultSPStorage> p67;
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNull, DefaultSPStorage> p68; typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNull, DefaultSPStorage> p68;
@ -267,7 +267,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNullStrict, DefaultSPStorage> p72; typedef SmartPtr<TestClass, DeepCopy, AllowConversion, RejectNullStrict, DefaultSPStorage> p72;
typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNullStrict, DefaultSPStorage> p73; typedef SmartPtr<TestClass, RefCounted, AllowConversion, RejectNullStrict, DefaultSPStorage> p73;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
AllowConversion, RejectNullStrict, DefaultSPStorage> p74; AllowConversion, RejectNullStrict, DefaultSPStorage> p74;
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNullStrict, DefaultSPStorage> p75; typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, RejectNullStrict, DefaultSPStorage> p75;
typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNullStrict, DefaultSPStorage> p76; typedef SmartPtr<TestClass, RefLinked, AllowConversion, RejectNullStrict, DefaultSPStorage> p76;
@ -277,7 +277,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNullStrict, DefaultSPStorage> p80; typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, RejectNullStrict, DefaultSPStorage> p80;
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNullStrict, DefaultSPStorage> p81; typedef SmartPtr<TestClass, RefCounted, DisallowConversion, RejectNullStrict, DefaultSPStorage> p81;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
DisallowConversion, RejectNullStrict, DefaultSPStorage> p82; DisallowConversion, RejectNullStrict, DefaultSPStorage> p82;
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNullStrict, DefaultSPStorage> p83; typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, RejectNullStrict, DefaultSPStorage> p83;
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNullStrict, DefaultSPStorage> p84; typedef SmartPtr<TestClass, RefLinked, DisallowConversion, RejectNullStrict, DefaultSPStorage> p84;
@ -287,7 +287,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, AllowConversion, NoCheck, DefaultSPStorage> p88; typedef SmartPtr<TestClass, DeepCopy, AllowConversion, NoCheck, DefaultSPStorage> p88;
typedef SmartPtr<TestClass, RefCounted, AllowConversion, NoCheck, DefaultSPStorage> p89; typedef SmartPtr<TestClass, RefCounted, AllowConversion, NoCheck, DefaultSPStorage> p89;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
AllowConversion, NoCheck, DefaultSPStorage> p90; AllowConversion, NoCheck, DefaultSPStorage> p90;
typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, NoCheck, DefaultSPStorage> p91; typedef SmartPtr<TestClass, COMRefCounted, AllowConversion, NoCheck, DefaultSPStorage> p91;
typedef SmartPtr<TestClass, RefLinked, AllowConversion, NoCheck, DefaultSPStorage> p92; typedef SmartPtr<TestClass, RefLinked, AllowConversion, NoCheck, DefaultSPStorage> p92;
@ -297,7 +297,7 @@ private:
typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, NoCheck, DefaultSPStorage> p96; typedef SmartPtr<TestClass, DeepCopy, DisallowConversion, NoCheck, DefaultSPStorage> p96;
typedef SmartPtr<TestClass, RefCounted, DisallowConversion, NoCheck, DefaultSPStorage> p97; typedef SmartPtr<TestClass, RefCounted, DisallowConversion, NoCheck, DefaultSPStorage> p97;
typedef SmartPtr<TestClass, RefCountedMTAdj<DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT, typedef SmartPtr<TestClass, RefCountedMTAdj<LOKI_DEFAULT_THREADING_NO_OBJ_LEVEL>::RefCountedMT,
DisallowConversion, NoCheck, DefaultSPStorage> p98; DisallowConversion, NoCheck, DefaultSPStorage> p98;
typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, NoCheck, DefaultSPStorage> p99; typedef SmartPtr<TestClass, COMRefCounted, DisallowConversion, NoCheck, DefaultSPStorage> p99;
typedef SmartPtr<TestClass, RefLinked, DisallowConversion, NoCheck, DefaultSPStorage> p100; typedef SmartPtr<TestClass, RefLinked, DisallowConversion, NoCheck, DefaultSPStorage> p100;

View file

@ -19,8 +19,8 @@
# pragma warning(disable: 4018 4097 4100 4213 4290 4512 4514 4700 4702 4710 4786 4800) # pragma warning(disable: 4018 4097 4100 4213 4290 4512 4514 4700 4702 4710 4786 4800)
#endif #endif
//#define CLASS_LEVEL_THREADING //#define LOKI_CLASS_LEVEL_THREADING
//#define OBJECT_LEVEL_THREADING #define LOKI_OBJECT_LEVEL_THREADING
// Some platforms might have difficulty with this // Some platforms might have difficulty with this
// Need to ifdef around those cases. // Need to ifdef around those cases.
@ -111,6 +111,9 @@ return result;
// $Log$ // $Log$
// Revision 1.6 2005/09/26 07:33:05 syntheticpp
// move macros into LOKI_ namespace
//
// Revision 1.5 2005/09/24 15:49:40 syntheticpp // Revision 1.5 2005/09/24 15:49:40 syntheticpp
// is it really binary? // is it really binary?
// //

View file

@ -89,23 +89,23 @@ public:
testAssert("SuperSubclassStrict",r,result); testAssert("SuperSubclassStrict",r,result);
r=SUPERSUBCLASS(Base,Derived1) && r=LOKI_SUPERSUBCLASS(Base,Derived1) &&
SUPERSUBCLASS(Base,Derived2) && LOKI_SUPERSUBCLASS(Base,Derived2) &&
SUPERSUBCLASS(Base,Base) && LOKI_SUPERSUBCLASS(Base,Base) &&
!SUPERSUBCLASS(Derived1,Base) && !LOKI_SUPERSUBCLASS(Derived1,Base) &&
!SUPERSUBCLASS(Derived2,Base) && !LOKI_SUPERSUBCLASS(Derived2,Base) &&
!SUPERSUBCLASS(void,Base); !LOKI_SUPERSUBCLASS(void,Base);
testAssert("SUPERSUBCLASS",r,result); testAssert("LOKI_SUPERSUBCLASS",r,result);
r=SUPERSUBCLASS_STRICT(Base,Derived1) && r=LOKI_SUPERSUBCLASS_STRICT(Base,Derived1) &&
SUPERSUBCLASS_STRICT(Base,Derived2) && LOKI_SUPERSUBCLASS_STRICT(Base,Derived2) &&
!SUPERSUBCLASS_STRICT(Base,Base) && !LOKI_SUPERSUBCLASS_STRICT(Base,Base) &&
!SUPERSUBCLASS_STRICT(Derived1,Base) && !LOKI_SUPERSUBCLASS_STRICT(Derived1,Base) &&
!SUPERSUBCLASS_STRICT(Derived2,Base) && !LOKI_SUPERSUBCLASS_STRICT(Derived2,Base) &&
!SUPERSUBCLASS_STRICT(void,Base); !LOKI_SUPERSUBCLASS_STRICT(void,Base);
testAssert("SUPERSUBCLASS_STRICT",r,result); testAssert("LOKI_SUPERSUBCLASS_STRICT",r,result);
std::cout << '\n'; std::cout << '\n';
} }

View file

@ -33,13 +33,13 @@ public:
using namespace Loki; using namespace Loki;
using namespace Loki::TL; using namespace Loki::TL;
typedef TYPELIST_1(char) CharList; typedef LOKI_TYPELIST_1(char) CharList;
typedef TYPELIST_3(char,int,double) CharIntDoubleList; typedef LOKI_TYPELIST_3(char,int,double) CharIntDoubleList;
typedef TYPELIST_4(char,int,double,char) CharIntDoubleCharList; typedef LOKI_TYPELIST_4(char,int,double,char) CharIntDoubleCharList;
typedef TYPELIST_3(Base,Derived1,Derived2) BaseDerived1Derived2List; typedef LOKI_TYPELIST_3(Base,Derived1,Derived2) BaseDerived1Derived2List;
typedef TYPELIST_3(Derived2,Derived1,Base) Derived2Derived1BaseList; typedef LOKI_TYPELIST_3(Derived2,Derived1,Base) Derived2Derived1BaseList;
typedef TYPELIST_4(Base,Derived1,Base,Derived2) BaseDerived1BaseDerived2List; typedef LOKI_TYPELIST_4(Base,Derived1,Base,Derived2) BaseDerived1BaseDerived2List;
typedef TYPELIST_4(Derived1,Base,Derived1,Derived2) Derived1BaseDerived1Derived2List; typedef LOKI_TYPELIST_4(Derived1,Base,Derived1,Derived2) Derived1BaseDerived1Derived2List;
bool r; bool r;
@ -85,30 +85,30 @@ public:
// MostDerived and DerivedToFront doesn't work on MSVC 6.0 // MostDerived and DerivedToFront doesn't work on MSVC 6.0
r=SameType<Append<NullType,NullType>::Result,NullType>::value && r=SameType<Append<NullType,NullType>::Result,NullType>::value &&
SameType<Append<NullType,char>::Result,TYPELIST_1(char)>::value && SameType<Append<NullType,char>::Result,LOKI_TYPELIST_1(char)>::value &&
SameType<Append<NullType,CharList>::Result,CharList>::value && SameType<Append<NullType,CharList>::Result,CharList>::value &&
SameType<Append<CharList,NullType>::Result,CharList>::value && SameType<Append<CharList,NullType>::Result,CharList>::value &&
SameType<Append<CharList,int>::Result,TYPELIST_2(char,int)>::value && SameType<Append<CharList,int>::Result,LOKI_TYPELIST_2(char,int)>::value &&
SameType<Append<CharList,CharIntDoubleList>::Result,TYPELIST_4(char,char,int,double)>::value; SameType<Append<CharList,CharIntDoubleList>::Result,LOKI_TYPELIST_4(char,char,int,double)>::value;
testAssert("Append",r,result); testAssert("Append",r,result);
r=SameType<Erase<NullType,char>::Result,NullType>::value && r=SameType<Erase<NullType,char>::Result,NullType>::value &&
SameType<Erase<CharList,char>::Result,NullType>::value && SameType<Erase<CharList,char>::Result,NullType>::value &&
SameType<Erase<CharList,long>::Result,CharList>::value && SameType<Erase<CharList,long>::Result,CharList>::value &&
SameType<Erase<CharIntDoubleList,int>::Result,TYPELIST_2(char,double)>::value && SameType<Erase<CharIntDoubleList,int>::Result,LOKI_TYPELIST_2(char,double)>::value &&
SameType<Erase<CharIntDoubleList,double>::Result,TYPELIST_2(char,int)>::value; SameType<Erase<CharIntDoubleList,double>::Result,LOKI_TYPELIST_2(char,int)>::value;
testAssert("Erase",r,result); testAssert("Erase",r,result);
r=SameType<EraseAll<NullType,char>::Result,NullType>::value && r=SameType<EraseAll<NullType,char>::Result,NullType>::value &&
SameType<EraseAll<CharList,char>::Result,NullType>::value && SameType<EraseAll<CharList,char>::Result,NullType>::value &&
SameType<EraseAll<CharList,long>::Result,CharList>::value && SameType<EraseAll<CharList,long>::Result,CharList>::value &&
SameType<EraseAll<CharIntDoubleList,int>::Result,TYPELIST_2(char,double)>::value && SameType<EraseAll<CharIntDoubleList,int>::Result,LOKI_TYPELIST_2(char,double)>::value &&
SameType<EraseAll<CharIntDoubleList,double>::Result,TYPELIST_2(char,int)>::value && SameType<EraseAll<CharIntDoubleList,double>::Result,LOKI_TYPELIST_2(char,int)>::value &&
SameType<EraseAll<CharIntDoubleCharList,char>::Result,TYPELIST_2(int,double)>::value && SameType<EraseAll<CharIntDoubleCharList,char>::Result,LOKI_TYPELIST_2(int,double)>::value &&
SameType<EraseAll<CharIntDoubleCharList,int>::Result,TYPELIST_3(char,double,char)>::value && SameType<EraseAll<CharIntDoubleCharList,int>::Result,LOKI_TYPELIST_3(char,double,char)>::value &&
SameType<EraseAll<CharIntDoubleCharList,double>::Result,TYPELIST_3(char,int,char)>::value; SameType<EraseAll<CharIntDoubleCharList,double>::Result,LOKI_TYPELIST_3(char,int,char)>::value;
testAssert("EraseAll",r,result); testAssert("EraseAll",r,result);
@ -120,26 +120,26 @@ public:
testAssert("NoDuplicates",r,result); testAssert("NoDuplicates",r,result);
r=SameType<Replace<NullType,char,long>::Result,NullType>::value && r=SameType<Replace<NullType,char,long>::Result,NullType>::value &&
SameType<Replace<CharList,char,long>::Result,TYPELIST_1(long)>::value && SameType<Replace<CharList,char,long>::Result,LOKI_TYPELIST_1(long)>::value &&
SameType<Replace<CharList,int,long>::Result,CharList>::value && SameType<Replace<CharList,int,long>::Result,CharList>::value &&
SameType<Replace<CharIntDoubleList,char,long>::Result,TYPELIST_3(long,int,double)>::value && SameType<Replace<CharIntDoubleList,char,long>::Result,LOKI_TYPELIST_3(long,int,double)>::value &&
SameType<Replace<CharIntDoubleList,long,char[16]>::Result,CharIntDoubleList>::value && SameType<Replace<CharIntDoubleList,long,char[16]>::Result,CharIntDoubleList>::value &&
SameType<Replace<CharIntDoubleCharList,char,long>::Result,TYPELIST_4(long,int,double,char)>::value; SameType<Replace<CharIntDoubleCharList,char,long>::Result,LOKI_TYPELIST_4(long,int,double,char)>::value;
testAssert("Replace",r,result); testAssert("Replace",r,result);
r=SameType<ReplaceAll<NullType,char,long>::Result,NullType>::value && r=SameType<ReplaceAll<NullType,char,long>::Result,NullType>::value &&
SameType<ReplaceAll<CharList,char,long>::Result,TYPELIST_1(long)>::value && SameType<ReplaceAll<CharList,char,long>::Result,LOKI_TYPELIST_1(long)>::value &&
SameType<ReplaceAll<CharList,int,long>::Result,CharList>::value && SameType<ReplaceAll<CharList,int,long>::Result,CharList>::value &&
SameType<ReplaceAll<CharIntDoubleList,char,long>::Result,TYPELIST_3(long,int,double)>::value && SameType<ReplaceAll<CharIntDoubleList,char,long>::Result,LOKI_TYPELIST_3(long,int,double)>::value &&
SameType<ReplaceAll<CharIntDoubleList,long,char[16]>::Result,CharIntDoubleList>::value && SameType<ReplaceAll<CharIntDoubleList,long,char[16]>::Result,CharIntDoubleList>::value &&
SameType<ReplaceAll<CharIntDoubleCharList,char,long>::Result,TYPELIST_4(long,int,double,long)>::value; SameType<ReplaceAll<CharIntDoubleCharList,char,long>::Result,LOKI_TYPELIST_4(long,int,double,long)>::value;
testAssert("ReplaceAll",r,result); testAssert("ReplaceAll",r,result);
r=SameType<Reverse<NullType>::Result,NullType>::value && r=SameType<Reverse<NullType>::Result,NullType>::value &&
SameType<Reverse<CharList>::Result,CharList>::value && SameType<Reverse<CharList>::Result,CharList>::value &&
SameType<Reverse<CharIntDoubleList>::Result,TYPELIST_3(double,int,char)>::value; SameType<Reverse<CharIntDoubleList>::Result,LOKI_TYPELIST_3(double,int,char)>::value;
testAssert("Reverse",r,result); testAssert("Reverse",r,result);
@ -159,8 +159,8 @@ public:
SameType<DerivedToFront<CharIntDoubleCharList>::Result,CharIntDoubleCharList>::value && SameType<DerivedToFront<CharIntDoubleCharList>::Result,CharIntDoubleCharList>::value &&
SameType<DerivedToFront<BaseDerived1Derived2List>::Result,Derived2Derived1BaseList>::value && SameType<DerivedToFront<BaseDerived1Derived2List>::Result,Derived2Derived1BaseList>::value &&
SameType<DerivedToFront<Derived2Derived1BaseList>::Result,Derived2Derived1BaseList>::value && SameType<DerivedToFront<Derived2Derived1BaseList>::Result,Derived2Derived1BaseList>::value &&
SameType<DerivedToFront<BaseDerived1BaseDerived2List>::Result,TYPELIST_4(Derived2,Derived1,Base,Base)>::value && SameType<DerivedToFront<BaseDerived1BaseDerived2List>::Result,LOKI_TYPELIST_4(Derived2,Derived1,Base,Base)>::value &&
SameType<DerivedToFront<Derived1BaseDerived1Derived2List>::Result,TYPELIST_4(Derived2,Derived1,Derived1,Base)>::value; SameType<DerivedToFront<Derived1BaseDerived1Derived2List>::Result,LOKI_TYPELIST_4(Derived2,Derived1,Derived1,Base)>::value;
testAssert("DerivedToFront",r,result); testAssert("DerivedToFront",r,result);

View file

@ -1,6 +1,6 @@
//#define CLASS_LEVEL_THREADING //#define LOKI_CLASS_LEVEL_THREADING
//#define OBJECT_LEVEL_THREADING //#define LOKI_OBJECT_LEVEL_THREADING
#include "SmallObj.h" #include "SmallObj.h"
#include "timer.h" #include "timer.h"