Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::ClosedBinaryOp Concept Reference

A binary functor closed over T. More...

#include <ah-concepts.H>

Concept definition

template<typename F, typename T>
requires(const F & f, const T & a, const T & b)
{
{ f(a, b) } -> std::convertible_to<T>;
}
A binary functor closed over T.
std::decay_t< typename HeadC::Item_Type > T
Definition ah-zip.H:152

Detailed Description

A binary functor closed over T.

f(a, b) is well-formed for const T& a, const T& b and returns something convertible to T. This is the shared shape behind DisjointSparseTableOp, SegmentTreeOp and FenwickBinaryOp (each kept as an alias for source compatibility) and SparseTableOp (which also rejects functors known not to be idempotent), which differ in which semantic law the caller must also provide (associativity, idempotency, ...) — this concept checks only the call signature, never the semantics.

Template Parameters
Ffunctor type.
Tvalue type.

Definition at line 475 of file ah-concepts.H.