Ring concept.
More...
#include <common_concepts.h>
template<typename K>
concept fun::Ring = STD_ALT::equality_comparable<K> &&
requires(K a, K pt_b) {
{ a + pt_b } -> STD_ALT::convertible_to<K>;
{ a - pt_b } -> STD_ALT::convertible_to<K>;
{ a * pt_b } -> STD_ALT::convertible_to<K>;
{ a += pt_b } -> STD_ALT::same_as<K&>;
{ a -= pt_b } -> STD_ALT::same_as<K&>;
{ a *= pt_b } -> STD_ALT::same_as<K&>;
{ -a } -> STD_ALT::convertible_to<K>;
{ K(a) } -> STD_ALT::convertible_to<K>;
{ K(0) } -> STD_ALT::convertible_to<K>;
}
Ring concept.
Definition common_concepts.h:56
Ring concept.
A ring is a set with two binary operations (addition and multiplication) satisfying certain algebraic properties.
- Template Parameters
-
| K | A type that supports ring operations |