Update contrib.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 // Provisional implementation of a construct that allows to determine
22 // at compile time whether a class type is derived from another class
25 // To be redefined using std::tr1:is_base_of when a TR1 implementation
26 // becomes available for use with Symbian OS.
29 // Implementation construct - do not use
30 template<typename B, typename D>
34 typedef TUint8 TIsDerived;
42 static TIsDerived ReturnType(B*);
43 static TIsNotDerived ReturnType(...);
49 EValue = sizeof(ReturnType(static_cast<D*>(0))) == sizeof(TIsDerived) ? 1 : 0
54 #define IS_BASE_OF(BaseType, DerivedType) TIsBaseOf<BaseType, DerivedType>::EValue