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: