Contents

SushiEngine

fold_range

template <typename T, typename Op>
T fold_range(const T *values, std::size_t first, std::size_t last, T identity, Op op) noexcept

Parameters

NameTypeDescription
valuesconst T *
firststd::size_t
laststd::size_t
identityT

The value an empty range folds to.

opOp

Returns

T

Description

Folds [first, last) in ascending index order, starting from the identity.

See also

engine/foundation/core/include/README.md