From 1b82d4044106c4d74477f24187b72e179af5cdc9 Mon Sep 17 00:00:00 2001 From: tslettebo Date: Sun, 29 Sep 2002 13:49:41 +0000 Subject: [PATCH] Fix: Moved the new templates inside the Loki namespace git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@52 7ec92016-0320-0410-acc4-a06ded1c099a --- Reference/TypeManip.h | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/Reference/TypeManip.h b/Reference/TypeManip.h index 5c2c2cc..3cb1ea8 100644 --- a/Reference/TypeManip.h +++ b/Reference/TypeManip.h @@ -137,7 +137,6 @@ namespace Loki public: enum { exists = 1, exists2Way = 1, sameType = 1 }; }; -} // namespace Loki //////////////////////////////////////////////////////////////////////////////// // class template SuperSubclass @@ -155,20 +154,6 @@ struct SuperSubclass !::Loki::Conversion::sameType) }; }; -//////////////////////////////////////////////////////////////////////////////// -// macro SUPERSUBCLASS -// Invocation: SUPERSUBCLASS(B, D) where B and D are types. -// Returns true if B is a public base of D, or if B and D are aliases of the -// same type. -// -// Caveat: might not work if T and U are in a private inheritance hierarchy. -// Deprecated: Use SuperSubclass class template instead. -//////////////////////////////////////////////////////////////////////////////// - -#define SUPERSUBCLASS(T, U) \ - (::Loki::Conversion::exists && \ - !::Loki::Conversion::sameType) - //////////////////////////////////////////////////////////////////////////////// // class template SuperSubclassStrict // Invocation: SuperSubclassStrict::value where B and D are types. @@ -185,6 +170,21 @@ struct SuperSubclassStrict !::Loki::Conversion::sameType) }; }; +} // namespace Loki + +//////////////////////////////////////////////////////////////////////////////// +// macro SUPERSUBCLASS +// Invocation: SUPERSUBCLASS(B, D) where B and D are types. +// Returns true if B is a public base of D, or if B and D are aliases of the +// same type. +// +// Caveat: might not work if T and U are in a private inheritance hierarchy. +// Deprecated: Use SuperSubclass class template instead. +//////////////////////////////////////////////////////////////////////////////// + +#define SUPERSUBCLASS(T, U) \ + ::Loki::SuperSubclass::value + //////////////////////////////////////////////////////////////////////////////// // macro SUPERSUBCLASS_STRICT // Invocation: SUPERSUBCLASS(B, D) where B and D are types. @@ -195,8 +195,7 @@ struct SuperSubclassStrict //////////////////////////////////////////////////////////////////////////////// #define SUPERSUBCLASS_STRICT(T, U) \ - (SUPERSUBCLASS(T, U) && \ - !::Loki::Conversion::sameType) + ::Loki::SuperSubclassStrict::value //////////////////////////////////////////////////////////////////////////////// // Change log: