GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::indirectly_readable_traits(3) C++ Standard Libary std::indirectly_readable_traits(3)

std::indirectly_readable_traits - std::indirectly_readable_traits


Defined in header <iterator>
template< class I > (1) (since C++20)
struct indirectly_readable_traits { };
template< class T > (2) (since C++20)
struct indirectly_readable_traits<T*>;
template< class I >


requires std::is_array_v<I> (3) (since C++20)


struct indirectly_readable_traits<I>;
template< class T >


struct indirectly_readable_traits<const T> : (4) (since C++20)


indirectly_readable_traits<T> { };
template </*has-member-value-type*/ T> (5) (since C++20)
struct indirectly_readable_traits<T>;
template </*has-member-element-type*/ T> (6) (since C++20)
struct indirectly_readable_traits<T>;
template </*has-member-value-type*/ T>


requires /*has-member-element-type*/<T> (7) (since C++20)


struct indirectly_readable_traits<T> { };
template </*has-member-value-type*/ T>


requires /*has-member-element-type*/<T> &&
std::same_as<std::remove_cv_t<typename T::element_type>, (8) (since C++20)
std::remove_cv_t<typename T::value_type>>


struct indirectly_readable_traits<T>;


Computes the associated value type of the type I, if any. Users may specialize
indirectly_readable_traits for a program-defined type.


1) Primary template has no member value_type.
2) Specialization for pointers. If T is an object type, provides a member type
value_type equal to std::remove_cv_t<T>. Otherwise, there is no member value_type.
3) Specialization for array types. Provides a member type value_type equal to
std::remove_cv_t<std::remove_extent_t<I>>.
4) Specialization for const-qualified types.
5) Specialization for types that define a public and accessible member type
value_type (e.g., std::reverse_iterator). If T::value_type is an object type,
provides a member type value_type equal to std::remove_cv_t<typename T::value_type>.
Otherwise, there is no member value_type.
6) Specialization for types that define a public and accessible member type
element_type (e.g., std::shared_ptr). If T::element_type is an object type, provides
a member type value_type equal to std::remove_cv_t<typename T::element_type>.
Otherwise, there is no member value_type.
7-8) Specialization for types that define public and accessible member types
value_type and element_type (e.g., std::span). If both T::value_type and
T::element_type are object types and they become the same type after removing
cv-qualifiers on the top-level, provides a member type value_type equal to
std::remove_cv_t<typename T::value_type>. Otherwise, there is no member value_type.


value_type is intended for use with indirectly_readable types such as iterators. It
is not intended for use with ranges.


This section is incomplete
Reason: no example


Defect reports


The following behavior-changing defect reports were applied retroactively to
previously published C++ standards.


DR Applied to Behavior as published Correct behavior
specializations were ambiguous for
LWG 3446 C++20 types containing a disambiguating
both value_type and element_type specialization added
member types
LWG 3446 introduced hard error for
LWG 3541 C++20 ambiguous cases that made resulting substitution
value_type and element_type are failure
different


indirectly_readable specifies that a type is indirectly readable by applying
(C++20) operator *
(concept)
iter_value_t
iter_reference_t
iter_const_reference_t
iter_difference_t
iter_rvalue_reference_t
iter_common_reference_t computes the associated types of an iterator
(C++20) (alias template)
(C++20)
(C++23)
(C++20)
(C++20)
(C++20)
iterator_traits provides uniform interface to the properties of an iterator
(class template)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.