fix fug SuperSubclass and incomplete classes, 630897

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@183 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2005-07-27 19:26:55 +00:00
parent 7fa263d636
commit ecd3aa136e

View file

@ -171,8 +171,11 @@ namespace Loki
template <class T, class U>
struct SuperSubclass
{
enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists &&
enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists &&
!::Loki::Conversion<const volatile T*, const volatile void*>::sameType) };
// Dummy data member to make sure that both classes are fully defined.
char dummy[sizeof (T) + sizeof (U)];
};
////////////////////////////////////////////////////////////////////////////////
@ -186,9 +189,12 @@ struct SuperSubclass
template<class T,class U>
struct SuperSubclassStrict
{
enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists &&
enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists &&
!::Loki::Conversion<const volatile T*, const volatile void*>::sameType &&
!::Loki::Conversion<const volatile T*, const volatile U*>::sameType) };
// Dummy data member to make sure that both classes are fully defined.
char dummy[sizeof (T) + sizeof (U)];
};
} // namespace Loki