Iterator library

来自cppreference.com
< cpp
 
 
迭代器库
迭代器原语
Original:
Iterator primitives
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iterator_traits
input_iterator_tag
output_iterator_tag
forward_iterator_tag
bidirectional_iterator_tag
random_access_iterator_tag
iterator
迭代器适配器
Original:
Iterator adaptors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reverse_iterator
流迭代器
Original:
Stream iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istream_iterator
ostream_iterator
istreambuf_iterator
ostreambuf_iterator
迭代器操作
Original:
Iterator operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
advance
distance
prev(C++11)
next(C++11)
远程接入
Original:
Range access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
begin(C++11)
end(C++11)
 
迭代器库提供的​​迭代器和迭代器的特征,适配器,和实用功能的定义.
Original:
The iterator library provides definitions for five kinds of iterators as well as iterator traits, adapters, and utility functions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目录

[编辑] 迭代器类

有五种类型的迭代器:InputIteratorOutputIteratorForwardIteratorBidirectionalIterator,和RandomAccessIterator.
Original:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
而不是被定义由特定类型的迭代器,每个类别被定义的,可以在其上执行的操作。这个定义是指任何类型支持必要的操作可以被用作一个迭代器 - 例如,一个指针支持所有的操作所需的RandomAccessIterator,所以一个指针可以在任何地方使用,预期一个RandomAccessIterator.
Original:
Instead of being defined by specific types, each category of iterator is defined by the operations that can be performed on it. This definition means that any type that supports the necessary operations can be used as an iterator -- for example, a pointer supports all of the operations required by RandomAccessIterator, so a pointer can be used anywhere a RandomAccessIterator is expected.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
五个迭代器类,可以组织成一个层次,更强大的迭代器类别(例如RandomAccessIterator)不那么强大的类别(例如InputIterator):支持的操作
Original:
The five iterator categories can be organized into a hierarchy, where more powerful iterator categories (e.g. RandomAccessIterator) support the operations of less powerful categories (e.g. InputIterator):
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterator category Defined operations
RandomAccessIterator BidirectionalIterator ForwardIterator InputIterator
  • 阅读
    Original:
    read
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 增量(不包括多遍)
    Original:
    increment (without multiple passes)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
OutputIterator
  • Original:
    write
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 增量(不包括多遍)
    Original:
    increment (without multiple passes)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 增量(多道次)
    Original:
    increment (with multiple passes)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 递减
    Original:
    decrement
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 随机接入
    Original:
    random access
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[编辑] 迭代器原语

提供统一的接口,一个迭代器的属性
Original:
provides uniform interface to the properties of an iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
空类类型用来表示迭代器类别
Original:
empty class types used to indicate iterator categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类) [edit]
基本的迭代器
Original:
the basic iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]

[编辑] 迭代器适配器

反序遍历的迭代器适配器
Original:
iterator adaptor for reverse-order traversal
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
(C++11)
迭代器适配器,它解引用一个右值引用
Original:
iterator adaptor which dereferences to an rvalue reference
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
创建一个std::move_iterator从参数的类型推断
Original:
creates a std::move_iterator of type inferred from the argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数模板) [edit]
在一个容器的端部,用于插入的迭代器适配器
Original:
iterator adaptor for insertion at the end of a container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
创建一个std::back_insert_iterator从参数的类型推断
Original:
creates a std::back_insert_iterator of type inferred from the argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数模板) [edit]
用于插入的容器在前面的迭代器适配器
Original:
iterator adaptor for insertion at the front of a container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
创建一个std::front_insert_iterator从参数的类型推断
Original:
creates a std::front_insert_iterator of type inferred from the argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数模板) [edit]
用于插入到一个容器中的迭代器适配器
Original:
iterator adaptor for insertion into a container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
创建一个std::insert_iterator从参数的类型推断
Original:
creates a std::insert_iterator of type inferred from the argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数模板) [edit]

[编辑] 流迭代器

输入迭代器,读取std::basic_istream
Original:
input iterator that reads from std::basic_istream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
输出迭代器,写入std::basic_ostream
Original:
output iterator that writes to std::basic_ostream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
输入迭代器,读取std::basic_streambuf
Original:
input iterator that reads from std::basic_streambuf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]
输出迭代器,写入std::basic_streambuf
Original:
output iterator that writes to std::basic_streambuf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(类模板) [edit]

[编辑] 迭代器操作

Defined in header <iterator>
给定距离的迭代器
Original:
advances an iterator by given distance
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
返回两个迭代器之间的距离
Original:
returns the distance between two iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C++11)
增加一个迭代器
Original:
increment an iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C++11)
减一个迭代器
Original:
decrement an iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]

[编辑] 远程接入

Defined in header <iterator>
(C++11)
返回一个迭代器的容器或数组的开始
Original:
returns an iterator to the beginning of a container or array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C++11)
返回一个迭代器的容器或数组
Original:
returns an iterator to the end of a container or array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]