ImplicitConv

Uses implicit conversion to create an instance of a specific type.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/UnrealTemplate.h

Include

#include "Templates/UnrealTemplate.h"

Syntax

template<typename T>
T ImplicitConv
(
    typename TIdentity< T >::Type Obj
)

Remarks

Uses implicit conversion to create an instance of a specific type. Useful to make things clearer or circumvent unintended type deduction in templates. Safer than C casts and static_casts, e.g. does not allow down-casts

Returns

The object converted to the specified type.

Parameters

Parameter

Description

Obj

The object (usually pointer or reference) to convert.