13namespace STD_ALT = std;
23 template <
typename T>
using Value_type =
typename T::value_type;
33 typename std::decay<decltype(back(std::declval<T>()))>::type;
41 concept Sequence =
requires(T t, Element_type<T> x) {
42 { t.size() } -> STD_ALT::convertible_to<std::size_t>;
43 { t.empty() } -> STD_ALT::convertible_to<bool>;
44 { t.back() } -> STD_ALT::same_as<Element_type<T>>;
45 { t.emplace_back(x) };
56 concept Ring = STD_ALT::equality_comparable<K> &&
requires(K a, K pt_b) {
57 { a + pt_b } -> STD_ALT::convertible_to<K>;
58 { a - pt_b } -> STD_ALT::convertible_to<K>;
59 { a * pt_b } -> STD_ALT::convertible_to<K>;
60 { a += pt_b } -> STD_ALT::same_as<K&>;
61 { a -= pt_b } -> STD_ALT::same_as<K&>;
62 { a *= pt_b } -> STD_ALT::same_as<K&>;
63 { -a } -> STD_ALT::convertible_to<K>;
64 { K(a) } -> STD_ALT::convertible_to<K>;
65 { K(0) } -> STD_ALT::convertible_to<K>;
85 { a % pt_b } -> STD_ALT::convertible_to<Z>;
86 { a / pt_b } -> STD_ALT::convertible_to<Z>;
87 { a %= pt_b } -> STD_ALT::same_as<Z&>;
88 { a /= pt_b } -> STD_ALT::same_as<Z&>;
Integral concept.
Definition common_concepts.h:84
Ordered ring concept.
Definition common_concepts.h:75
Ring concept.
Definition common_concepts.h:56
Sequence.
Definition common_concepts.h:41
Definition ck_concepts.hpp:11
typename T::value_type Value_type
Value type of a type.
Definition common_concepts.h:23
typename std::decay< decltype(back(std::declval< T >()))>::type Element_type
Element type of a sequence.
Definition common_concepts.h:33