[ Web Proxy ]
URL:
Viewing: http://ko.cppreference.com/cpp/iterator [Back]  [Original]

Iterator library - cppreference.com
cppreference.com

Iterator library

cppreference.com
< cpp

(iterator) 5(c++17 ) 6(c++17 ) , , .

Iterator categories

 : LegacyInputIterator, LegacyOutputIterator, LegacyForwardIterator, LegacyBidirectionalIterator, LegacyRandomAccessIterator, LegacyContiguousIterator


. . -- , LegacyRandomAccessIterator LegacyRandomAccessIterator .

OutputInterator LegacyContiguousIterator ( LegacyRandomAccessIterator) ( LegacyInputIterator) . LegacyOutputIterator . mutable , . Non-mutable constant .


Iterator category Defined operations
LegacyRandomAccessIterator LegacyBidirectionalIterator LegacyForwardIterator LegacyInputIterator
  • (without multiple passes)
  • (with multiple passes)
  • decrement
  • random access

Iterators that fall into one of the above categories and also meet the requirements of LegacyOutputIterator are called mutable iterators.

LegacyOutputIterator
  • write
  • increment (without multiple passes)

Iterators that fall into one of the above categories and also meet the requirements of LegacyContiguousIterator are called contiguous iterators.

LegacyContiguousIterator
  • contiguous storage

Iterator primitives

provides uniform interface to the properties of an iterator
(class template) [edit]
empty class types used to indicate iterator categories
(class) [edit]
the basic iterator
(class template) [edit]

Iterator adaptors

iterator adaptor for reverse-order traversal
(class template) [edit]
iterator adaptor which dereferences to an rvalue reference
(class template) [edit]
creates a std::move_iterator of type inferred from the argument
(function template) [edit]
iterator adaptor for insertion at the end of a container
(class template) [edit]
creates a std::back_insert_iterator of type inferred from the argument
(function template) [edit]
iterator adaptor for insertion at the front of a container
(class template) [edit]
creates a std::front_insert_iterator of type inferred from the argument
(function template) [edit]
iterator adaptor for insertion into a container
(class template) [edit]
creates a std::insert_iterator of type inferred from the argument
(function template) [edit]

Stream iterators

input iterator that reads from std::basic_istream
(class template) [edit]
output iterator that writes to std::basic_ostream
(class template) [edit]
input iterator that reads from std::basic_streambuf
(class template) [edit]
output iterator that writes to std::basic_streambuf
(class template) [edit]

Iterator operations

<iterator> .
advances an iterator by given distance
(function) [edit]
returns the distance between two iterators
(function) [edit]
(C++11)
increment an iterator
(function) [edit]
(C++11)
decrement an iterator
(function) [edit]

Range access

<iterator> .
(C++11)
(C++14)
returns an iterator to the beginning of a container or array
(function) [edit]
(C++11)
(C++14)
returns an iterator to the end of a container or array
(function) [edit]
returns a reverse iterator to a container or array
(function) [edit]
(C++14)
returns a reverse end iterator for a container or array
(function) [edit]

Web Proxy Viewer  |  New URL  |  Original Page