formattable_range Concept
Concept satisfied when T is a range that the formatter writes element by element. More...
Definition
template <class T>
concept micro_os_plus::micro_test_plus::detail::formattable_range = (container_like<T> or free_range<T>) and (not std::is_array_v<T>)
and (not string_like<T>)
and (not std::is_same_v<typename range_element<T>::type, T>)
and extension::printable<typename range_element<T>::type>
concept micro_os_plus::micro_test_plus::detail::formattable_range = (container_like<T> or free_range<T>) and (not std::is_array_v<T>)
and (not string_like<T>)
and (not std::is_same_v<typename range_element<T>::type, T>)
and extension::printable<typename range_element<T>::type>
Description
Concept satisfied when T is a range that the formatter writes element by element.
- Template Parameters
-
T The type to be checked.
The formattable_range concept is satisfied when T can be iterated by a range-based for statement, with begin() and end() members (container_like) or functions (free_range), and:
- is not an array, since the comparators convert the arrays to basic_c_string, written as text, or to array_operand, a range (see as_operand()), and an array given to the formatter directly is written as text, if it holds characters, or otherwise as the address it decays to;
- is not a string (see string_like), which is written as text;
- does not have elements of its own type, like std::filesystem::path, whose elements are paths, so that formatting it would recurse without end;
- has elements that satisfy extension::printable, so that a range of elements that cannot be reported is rejected where it is compared, not where its elements are formatted.
The conditions are tested in this order, so the elements of a recursive range are not tested.
Definition at line 665 of file extension.h.
template<class T>
concept formattable_range = (container_like<T> or free_range<T>) and (not std::is_array_v<T>)
and (not string_like<T>)
and (not std::is_same_v<typename range_element<T>::type, T>)
and extension::printable<typename range_element<T>::type>
Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.