Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::concepts::BinaryFunction Concept Referenceexport

A callable type that takes two arguments. More...

#include <callable.h>

Concept definition

template<typename F, typename Arg1, typename Arg2>
A callable type that takes two arguments.
Definition callable.h:173
A callable type that can be invoked with given arguments.
Definition callable.h:62

Detailed Description

A callable type that takes two arguments.

Example usage:

template<typename T, BinaryFunction<T, T> F>
T reduce(const std::vector<T>& vec, T init, F&& func) {
for (const auto& item : vec) {
init = func(init, item);
}
return init;
}

Definition at line 173 of file callable.h.