VisitTupleElements

Visits each element in the specified tuples in parallel and applies them as arguments to the functor.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Templates/Tuple.h"

Syntax

template<typename FuncType, typename FirstTupleType, typename... TupleTypes>
FORCEINLINEvoid VisitTupleElements
(
    FuncType && Func,
    FirstTupleType && FirstTuple,
    TupleTypes &&... Tuples
)

Remarks

Visits each element in the specified tuples in parallel and applies them as arguments to the functor. All specified tuples must have the same number of elements.

Example:

void Func(const TTuple& Tuple1, const TTuple& Tuple2) { // Equivalent to: // Functor(Tuple1.Get<0>(), Tuple2.Get<0>()); // Functor(Tuple1.Get<1>(), Tuple2.Get<1>()); // Functor(Tuple1.Get<2>(), Tuple2.Get<2>()); VisitTupleElements(Functor, Tuple1, Tuple2); }

Parameters

Parameter

Description

Func

The functor to apply.

Tuples

The tuples whose elements are to be applied to the functor.

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