Function: IterRepeat

public:
template <typename T>
TIterRepeat<T> IterRepeat(
    T Value
);

Iterator that yields one value infinitely.

Useful to combine it with Take iterator to avoid infinite loops or collecting iterator values that never ends.

Example

// [1, 1, 1, 1, 1]
const TArray<int> Result = IterRepeat(1).Take(5).CollectArray();

Arguments

  • Value

    T Value
    

    Value that iterator should yield infinitely.


Documentation built with Unreal-Doc v1.0.8 tool by PsichiX