Namespaces
Variants
Views
Actions

std::experimental::ranges::input_iterator_tag, std::experimental::ranges::output_iterator_tag, std::experimental::ranges::forward_iterator_tag, std::experimental::ranges::bidirectional_iterator_tag, std::experimental::ranges::random_access_iterator_tag

From cppreference.com
< cpp‎ | experimental‎ | ranges
 
 
Technical specifications
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals 2 TS)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Concepts (concepts TS)
Ranges (ranges TS)
Mathematical special functions (special functions TR)
 
 
Iterators library
Iterator concepts
Indirect callable concepts
                                                  
                                                  
                                                  
Common algorithm requirements
                                                  
Concept utilities
Iterator utilities and operations
Iterator traits
input_iterator_tagoutput_iterator_tagforward_iterator_tagbidirectional_iterator_tagrandom_access_iterator_tag

Iterator adaptors
Stream iterators
 
struct input_iterator_tag { };
struct output_iterator_tag { };
struct forward_iterator_tag : public input_iterator_tag { };
struct bidirectional_iterator_tag : public forward_iterator_tag { };
struct random_access_iterator_tag : public bidirectional_iterator_tag { };

Defines the category of an iterator. Each tag is an empty type and corresponds to one of the five iterator categories:

Iterator category tags carry information that can be used to select the most efficient algorithms for the specific requirement set that is implied by the category. However, concept-based overloading is preferred.

For every InputIterator type I, ranges::iterator_category_t<I> must be defined to be an alias for the most specific category tag that describes the iterator's behavior.

[edit] Example

[edit] See also

empty class types used to indicate iterator categories
(class) [edit]
compatibility traits class that collects an iterator’s associated types
(alias template) [edit]