std::experimental::ranges::iterator_category (3) - Linux Manuals
std::experimental::ranges::iterator_category: std::experimental::ranges::iterator_category
Command to display std::experimental::ranges::iterator_category
manual in Linux: $ man 3 std::experimental::ranges::iterator_category
NAME
std::experimental::ranges::iterator_category - std::experimental::ranges::iterator_category
Synopsis
Defined in header <experimental/ranges/iterator>
template< class I > (1)
struct iterator_category { };
template< class T > (2)
struct iterator_category<T*>;
template< class T > (3)
struct iterator_category<const T> : iterator_category<T> { };
template <class T>
requires requires { typename T::iterator_category; } (4)
struct iterator_category<T>;
Computes the iterator category of the class I, if any. Users may specialize iterator_category for a program-defined type.
1) Primary template is an empty struct.
2) Specialization for pointers. If T is an object type, provides a member type type equal to ranges::random_access_iterator_tag. Otherwise, there is no member type.
3) Specialization for const-qualified types.
4) Specialization for types that define a public and accessible member type iterator_category. If T::iterator_category is the same as or derived from one of iterator category tags in namespace std, it is mapped to the corresponding tag in the namespace ranges as described below. Otherwise, provides a member type type equal to T::iterator_category.
* If T::iterator_category is the same as or derives from std::random_access_iterator_tag, provides a member type type equal to ranges::random_access_iterator_tag.
* Otherwise, if T::iterator_category is the same as or derives from std::bidirectional_iterator_tag, provides a member type type equal to ranges::bidirectional_iterator_tag.
* Otherwise, if T::iterator_category is the same as or derives from std::forward_iterator_tag, provides a member type type equal to ranges::forward_iterator_tag.
* Otherwise, if T::iterator_category is the same as or derives from std::input_iterator_tag, provides a member type type equal to ranges::input_iterator_tag.
* Otherwise, if T::iterator_category is the same as or derives from std::output_iterator_tag, there is no member type.
Helper alias template
template< class T > (ranges TS)
using iterator_category_t = typename ranges::iterator_category<T>::type;
Example
This section is incomplete
Reason: no example
See also
input_iterator_tag
output_iterator_tag
forward_iterator_tag
bidirectional_iterator_tag
random_access_iterator_tag
contiguous_iterator_tag empty class types used to indicate iterator categories
(class)
(C++20)
input_iterator_tag
output_iterator_tag empty class types used to indicate iterator categories
forward_iterator_tag (class)
bidirectional_iterator_tag
random_access_iterator_tag
compatibility traits class that collects an iterator’s associated types
iterator_traits (alias template)
Pages related to std::experimental::ranges::iterator_category
- std::experimental::ranges::iterator_t,std::experimental::ranges::sentinel_t (3) - std::experimental::ranges::iterator_t,std::experimental::ranges::sentinel_t
- std::experimental::ranges::identity (3) - std::experimental::ranges::identity
- std::experimental::ranges::indirect_result_of (3) - std::experimental::ranges::indirect_result_of
- std::experimental::ranges::input_iterator_tag, (3) - std::experimental::ranges::input_iterator_tag,
- std::experimental::ranges::invoke (3) - std::experimental::ranges::invoke
- std::experimental::ranges::is_permutation (3) - std::experimental::ranges::is_permutation
- std::experimental::ranges::is_swappable_with,std::experimental::ranges::is_swappable, (3) - std::experimental::ranges::is_swappable_with,std::experimental::ranges::is_swappable,
- std::experimental::ranges::Assignable (3) - std::experimental::ranges::Assignable
- std::experimental::ranges::BidirectionalIterator (3) - std::experimental::ranges::BidirectionalIterator
- std::experimental::ranges::BidirectionalRange (3) - std::experimental::ranges::BidirectionalRange
- std::experimental::ranges::Boolean (3) - std::experimental::ranges::Boolean
- std::experimental::ranges::BoundedRange (3) - std::experimental::ranges::BoundedRange
- std::experimental::ranges::Common (3) - std::experimental::ranges::Common
- std::experimental::ranges::CommonReference (3) - std::experimental::ranges::CommonReference
- std::experimental::ranges::Constructible (3) - std::experimental::ranges::Constructible
- std::experimental::ranges::ConvertibleTo (3) - std::experimental::ranges::ConvertibleTo
- std::experimental::ranges::CopyConstructible (3) - std::experimental::ranges::CopyConstructible
- std::experimental::ranges::Copyable (3) - std::experimental::ranges::Copyable
- std::experimental::ranges::DefaultConstructible (3) - std::experimental::ranges::DefaultConstructible
- std::experimental::ranges::DerivedFrom (3) - std::experimental::ranges::DerivedFrom
- std::experimental::ranges::Destructible (3) - std::experimental::ranges::Destructible
- std::experimental::ranges::EqualityComparable, (3) - std::experimental::ranges::EqualityComparable,
- std::experimental::ranges::EqualityComparable,std::experimental::ranges::EqualityComparableWith (3) - std::experimental::ranges::EqualityComparable,std::experimental::ranges::EqualityComparableWith
- std::experimental::ranges::ForwardIterator (3) - std::experimental::ranges::ForwardIterator
- std::experimental::ranges::ForwardRange (3) - std::experimental::ranges::ForwardRange
- std::experimental::ranges::Incrementable (3) - std::experimental::ranges::Incrementable
- std::experimental::ranges::IndirectRelation (3) - std::experimental::ranges::IndirectRelation
- std::experimental::ranges::IndirectStrictWeakOrder (3) - std::experimental::ranges::IndirectStrictWeakOrder
- std::experimental::ranges::IndirectUnaryInvocable, (3) - std::experimental::ranges::IndirectUnaryInvocable,
- std::experimental::ranges::IndirectUnaryInvocable,std::experimental::ranges::IndirectRegularUnaryInvocable (3) - std::experimental::ranges::IndirectUnaryInvocable,std::experimental::ranges::IndirectRegularUnaryInvocable
- std::experimental::ranges::IndirectUnaryPredicate (3) - std::experimental::ranges::IndirectUnaryPredicate