Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::indirectly_readable_traits< Itr > Class Template Reference

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...

Inheritance diagram for arene::base::indirectly_readable_traits< Itr >:
Inheritance graph

Detailed Description

template<typename Itr>
class arene::base::indirectly_readable_traits< Itr >

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.

Template Parameters
ItrThe 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:

  1. If the input type is an array, std::remove_cv_t<std::remove_extent_t<T>> where T is the pointed-to type .
  2. If the input type has a member typedef value_type but not element_type , cond_value_type<typename Itr::value_type>
  3. If the input type has a member typedef element_type but not value_type , cond_value_type<typename Itr::element_type>
  4. If the input type has both member typedefs value_type and element_type and they are the same (ignoring cv-qualifiers), cond_value_type<typename Itr::value_type>
  5. If the input type has both member typedefs 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.


The documentation for this class was generated from the following file: