22concept c_readable =
requires(T value, std::istream& input_stream) { input_stream >> value; };
29concept c_writable =
requires(T value, std::ostream& output_stream) { output_stream << value; };
50template <
typename T,
typename... Types>
51concept c_one_of = std::disjunction_v<std::is_same<T, Types>...>;
71template <
typename T,
typename U, type_val
idator TV>
79template <
typename T,
typename U>
80inline constexpr bool is_valid_type_v<T, U, type_validator::same> = std::same_as<T, U>;
87template <
typename T,
typename U>
88inline constexpr bool is_valid_type_v<T, U, type_validator::convertible> =
89 std::convertible_to<T, U>;
97template <
typename T,
typename U, type_val
idator TV = type_val
idator::same>
106template <
typename R,
typename V, type_val
idator TV = type_val
idator::same>
108 std::ranges::range<R>
117template <
typename R,
typename V, type_val
idator TV = type_val
idator::same>
119 std::ranges::sized_range<R>
The concept is used to verify the validity of the arguments' value types.
The concept is satisfied when T is an arithmetic type.
Validates that T is the same as one of the types defined by Types.
Validates that R is a range of type T (ignoring the cvref attributes).
The concept is satisfied when T overloads the std::istream operator >>.
Validates that R is a sized range of type T (ignoring the cvref attributes).
Concept that enforces is_valid_type_v.
The concept is satisfied when T overloads the std::ostream operator <<.
constexpr bool is_valid_type_v
Checks if two types satisfy a given type_validator rule.
type_validator
Specifies the type validation rule.
@ convertible
Implicit conversion allowed.