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:
parent
7fa263d636
commit
ecd3aa136e
1 changed files with 8 additions and 2 deletions
|
@ -171,8 +171,11 @@ namespace Loki
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
struct SuperSubclass
|
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) };
|
!::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>
|
template<class T,class U>
|
||||||
struct SuperSubclassStrict
|
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 void*>::sameType &&
|
||||||
!::Loki::Conversion<const volatile T*, const volatile U*>::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
|
} // namespace Loki
|
||||||
|
|
Loading…
Add table
Reference in a new issue