All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
blaze::IsBaseOf< Base, Derived > Class Template Reference

Compile time analysis of an inheritance relationship.This type trait tests for an inheritance relationship between the two types Base and Derived. If Derived is a type derived from Base or the same type as Base the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType. More...

#include <IsBaseOf.h>

Inherits Type< Base, Derived >.

Detailed Description

template<typename Base, typename Derived>
class blaze::IsBaseOf< Base, Derived >

Compile time analysis of an inheritance relationship.

This type trait tests for an inheritance relationship between the two types Base and Derived. If Derived is a type derived from Base or the same type as Base the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.

class A { ... };
class B : public A { ... };
class C { ... };
blaze::IsBaseOf<A,B>::value // Evaluates to 1
blaze::IsBaseOf<A,B>::Type // Results in TrueType
blaze::IsBaseOf<A,B> // Is derived from TrueType
blaze::IsBaseOf<A,C>::value // Evaluates to 0
blaze::IsBaseOf<B,A>::Type // Results in FalseType
blaze::IsBaseOf<B,A> // Is derived from FalseType

The documentation for this class was generated from the following file: