![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
Determines the value_type of an input indirectly readable type, which is a type whose value is "readable" via the dereference operator such as iterators, pointers, etc.
More...

Determines the value_type of an input indirectly readable type, which is a type whose value is "readable" via the dereference operator such as iterators, pointers, etc.
| Itr | The input type for which to determine the value_type of. |
Let cond_value_type<T> be an exposition only trait which will have a member typedef value_type defined as std::remove_cv_t<T> if std::is_object<T> is satisfied, otherwise value_type will not be defined .
The presence/type of the member typedef value_type is determined based on the following selecting rules:
std::remove_cv_t<std::remove_extent_t<T>> where T is the pointed-to type .value_type but not element_type , cond_value_type<typename Itr::value_type>element_type but not value_type , cond_value_type<typename Itr::element_type>value_type and element_type and they are the same (ignoring cv-qualifiers), cond_value_type<typename Itr::value_type>value_type and element_type and they are different (ignoring cv-qualifiers), then value_type will not be defined. Otherwise, value_type will not be defined.Users are free to specialize indirectly_readable_traits for their own types.