UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TIsDerivedFrom< DerivedType, BaseType > Struct Template Reference

#include <UnrealTypeTraits.h>

Public Types

typedef char No[1]
 
typedef char Yes[2]
 

Static Public Member Functions

static YesTest (BaseType *)
 
static YesTest (const BaseType *)
 
static NoTest (...)
 
static DerivedType * DerivedTypePtr ()
 

Static Public Attributes

static constexpr bool Value = sizeof(Test( DerivedTypePtr() )) == sizeof(Yes)
 
static constexpr bool IsDerived = Value
 

Detailed Description

template<typename DerivedType, typename BaseType>
struct TIsDerivedFrom< DerivedType, BaseType >

Is type DerivedType inherited from BaseType.

Examples
/work/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

Member Typedef Documentation

◆ No

template<typename DerivedType , typename BaseType >
typedef char TIsDerivedFrom< DerivedType, BaseType >::No[1]

◆ Yes

template<typename DerivedType , typename BaseType >
typedef char TIsDerivedFrom< DerivedType, BaseType >::Yes[2]

Member Function Documentation

◆ DerivedTypePtr()

template<typename DerivedType , typename BaseType >
static DerivedType * TIsDerivedFrom< DerivedType, BaseType >::DerivedTypePtr ( )
inlinestatic

◆ Test() [1/3]

template<typename DerivedType , typename BaseType >
static No & TIsDerivedFrom< DerivedType, BaseType >::Test (   ...)
static

◆ Test() [2/3]

template<typename DerivedType , typename BaseType >
static Yes & TIsDerivedFrom< DerivedType, BaseType >::Test ( BaseType *  )
static

◆ Test() [3/3]

template<typename DerivedType , typename BaseType >
static Yes & TIsDerivedFrom< DerivedType, BaseType >::Test ( const BaseType *  )
static

Member Data Documentation

◆ IsDerived

template<typename DerivedType , typename BaseType >
constexpr bool TIsDerivedFrom< DerivedType, BaseType >::IsDerived = Value
staticconstexpr

◆ Value

template<typename DerivedType , typename BaseType >
constexpr bool TIsDerivedFrom< DerivedType, BaseType >::Value = sizeof(Test( DerivedTypePtr() )) == sizeof(Yes)
staticconstexpr

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