Concept specifying a type is a Monoid.
More...
#include <kumi/utils/concepts.hpp>
Concept specifying a type is a Monoid.
A type T models kumi::monoid if it's a binary associative callable equipped with an identity element acting as the neutral element for that operation.
The identity is defined so that the following property holds for the operation.
Concept specifying a type is a Monoid.
Definition concepts.hpp:326
- Note
- The operation is not required to be commutative; that is monoid(x,y) and monoid(y,x) may yield different results. (Ie : the monoid is not necessarily abelian)
template<typename M>
{ std::remove_cvref_t<M>::identity };
{ std::remove_cvref_t<M>{}(std::remove_cvref_t<M>::identity, std::remove_cvref_t<M>::identity) };
}