Invoke

Invokes a callable with a set of arguments.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Templates/Invoke.h"

Syntax

template<typename FuncType, typename... ArgTypes>
auto Invoke
(
    FuncType && Func,
    ArgTypes &&... Args
)

Remarks

Invokes a callable with a set of arguments. Allows the following:

  • Calling a functor object given a set of arguments.

  • Calling a function pointer given a set of arguments.

  • Calling a member function given a reference to an object and a set of arguments.

  • Calling a member function given a pointer (including smart pointers) to an object and a set of arguments.

  • Projecting via a data member pointer given a reference to an object.

  • Projecting via a data member pointer given a pointer (including smart pointers) to an object.

See: http://en.cppreference.com/w/cpp/utility/functional/invoke

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