Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::utils::FolderFor Concept Reference

Concept for folder functions that accumulate values. More...

#include <functional_adapters.hpp>

Concept definition

template<typename Folder, typename Accumulator, typename ValueType>
concept FolderFor =
(std::invocable<Folder, Accumulator, ValueType> &&
std::convertible_to<std::invoke_result_t<Folder, Accumulator, ValueType>,
Accumulator>) ||
(details::FolderApplicable<Folder, Accumulator,
std::remove_cvref_t<ValueType>> &&
std::convertible_to<
details::folder_apply_result_t<Folder, Accumulator,
std::remove_cvref_t<ValueType>>,
Accumulator>)
Concept for folder functions that accumulate values.
typename folder_apply_result< Folder, Accumulator, Tuple >::type folder_apply_result_t

Detailed Description

Concept for folder functions that accumulate values.

The function must be invocable with an accumulator and a value type. Supports both direct invocation and std::apply for tuple unpacking.

Template Parameters
FolderFolder function type
AccumulatorAccumulator type
ValueTypeType of values to fold

Definition at line 263 of file functional_adapters.hpp.