GlobalObjects
Loading...
Searching...
No Matches
glo::IsBaseClassOf< Base, Derived > Class Template Reference

Checks whether template parameters are classes and whether the class of the second template parameter is of the type of the class of the first template parameter or is derived from it. More...

#include <GloTOndemand.h>

Classes

struct  IsClass
 
struct  No
 

Static Public Attributes

static const bool value
 

Private Types

typedef char Yes
 

Static Private Member Functions

static No Test (...)
 
static Yes Test (Base *)
 

Detailed Description

template<typename Base, typename Derived>
class glo::IsBaseClassOf< Base, Derived >

Checks whether template parameters are classes and whether the class of the second template parameter is of the type of the class of the first template parameter or is derived from it.

Member Typedef Documentation

◆ Yes

template<typename Base, typename Derived>
typedef char glo::IsBaseClassOf< Base, Derived >::Yes
private

Size: 1 byte

Member Function Documentation

◆ Test() [1/2]

template<typename Base, typename Derived>
static No glo::IsBaseClassOf< Base, Derived >::Test ( ...)
staticprivate

This overload is chosen if the previous one does not fit (SFINAE).

◆ Test() [2/2]

template<typename Base, typename Derived>
static Yes glo::IsBaseClassOf< Base, Derived >::Test ( Base * )
staticprivate

Function to check the conversion from 'Derived*' to 'Base*'.
This overload is selected if 'Derived*' is convertible to 'Base*'.

Member Data Documentation

◆ value

template<typename Base, typename Derived>
const bool glo::IsBaseClassOf< Base, Derived >::value
static
Initial value:
&& sizeof( Test( static_cast<Derived*>( 0 ) ) ) == sizeof(Yes)
char Yes
Definition GloTOndemand.h:83
static Yes Test(Base *)
static const bool value
Definition GloTOndemand.h:138

If 'Test(Derived*)' selects the 'Yes' version, then Derived is derived from Base.

Referenced by glo::TOndemand< T >::TOndemand(), glo::TOndemand< T >::operator!=(), glo::TOndemand< T >::operator=(), and glo::TOndemand< T >::operator==().


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