std::iterator_traits
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <iterator>
|
||
template< class Iterator> struct iterator_traits; |
||
template< class T > struct iterator_traits<T*>; |
||
template< class T > struct iterator_traits<const T*>; |
||
std::iterator_traits característica é a classe de tipo que fornece uma interface uniforme para as propriedades dos tipos iterador. Isso torna possível implementar algoritmos só em termos de iteradores.Original:
std::iterator_traits is the type trait class that provides uniform interface to the properties of iterator types. This makes it possible to implement algorithms only in terms of iterators.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Tipos de membro
Tipo de membro
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
difference_type
|
Iterator::difference_type
|
value_type
|
Iterator::value_type
|
pointer
|
Iterator::pointer
|
reference
|
Iterator::reference
|
iterator_category
|
Iterator::iterator_category
|
Especializações
Esta característica tipo pode ser especializado para os tipos fornecidos pelo utilizador que podem ser utilizados como iteradores. A biblioteca padrão fornece duas especializações parciais para tipos de ponteiro T *, o que torna possível a utilização de todos os algoritmos baseados iterador com ponteiros crus.
Original:
This type trait may be specialized for user-provided types that may be used as iterators. The standard library provides two partial specializations for pointer types T*, which makes it possible to use all iterator-based algorithms with raw pointers.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
* T membros tipos de especialização
Tipo de membro
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
difference_type
|
std::ptrdiff_t |
value_type
|
T
|
pointer
|
T*
|
reference
|
T&
|
iterator_category
|
std::random_access_iterator_tag |