Helios Engine 0.1.0
A modular ECS based data-oriented C++23 game engine
 
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>
(std::invocable<Folder, Accumulator, ValueType> &&
std::convertible_to<std::invoke_result_t<Folder, Accumulator, ValueType>, Accumulator>) ||
(details::is_folder_applicable_v<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
constexpr bool is_folder_applicable_v

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 181 of file functional_adapters.hpp.