Blaze 3.9
blaze::IsBaseOf< Base, Derived > Class Template Reference

Compile time analysis of an inheritance relationship. More...

#include <IsBaseOf.h>

Inherits blaze::IntegralConstant< T, N >.

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 contant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.

class A { ... };
class B : public A { ... };
class C { ... };
blaze::IsBaseOf<A,B>::value // Evaluates to 'true'
blaze::IsBaseOf<A,B>::Type // Results in TrueType
blaze::IsBaseOf<A,B> // Is derived from TrueType
blaze::IsBaseOf<A,C>::value // Evaluates to 'false'
blaze::IsBaseOf<B,A>::Type // Results in FalseType
blaze::IsBaseOf<B,A> // Is derived from FalseType
Compile time analysis of an inheritance relationship.
Definition: IsBaseOf.h:82

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