ForwardAsBase

ForwardAsBase will cast a reference to an rvalue reference of a base type.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Templates/UnrealTemplate.h"

Syntax

template<typename T, typename Base, decltype(ImplicitConv< const volatile Base * >((typename TRemoveReference< T >::Type *) nullptr))*>
decltype(auto) ForwardAsBase
(
    typename TRemoveReference< T >::Type & Obj
)

Remarks

ForwardAsBase will cast a reference to an rvalue reference of a base type. This allows the perfect forwarding of a reference as a base class.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss