<div class="t-tr-text">C + +: concetti<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">C++ concepts:</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> RandomAccessIterator
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Un
RandomAccessIterator
è un BidirectionalIterator
che può essere spostato per puntare a qualsiasi elemento in tempo costante.Original:
A
RandomAccessIterator
is a BidirectionalIterator
that can be moved to point to any element in constant time.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.
Un puntatore standard è un esempio di un tipo che soddisfa questo concetto.
Original:
A standard pointer is an example of a type that satisfies this concept.
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.
[modifica] Requisiti
Oltre al requisito di cui sopra, per un tipo
It
essere un RandomAccessIterator
, istanze a
, b
, i
e r
di It
deve:Original:
In addition to the above requirement, for a type
It
to be an RandomAccessIterator
, instances a
, b
, i
, and r
of It
must: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.
Expression | Return | Equivalent expression | Notes |
---|---|---|---|
r += n | It& | if(n>=0) while(n--) ++r; |
|
i + n | It | It temp = i; return temp += n; |
|
n + i | It | i + n | |
r -= n | It& | return r += -n; | |
i - n | It | It temp = i; return temp -= n; |
|
n - i | It | i - n | |
b - a | difference |
n |
returns n such that a+n==b
|
i[n] | convertible to reference |
*(i + n) | |
a < b | contextually convertible to bool | b - a > 0 | Strict total ordering relation:
|
a > b | contextually convertible to bool | b < a | Total ordering relation opposite to a < b |
a >= b | contextually convertible to bool | !(a < b) | |
a <= b | contextually convertible to bool | !(a > b) |
[modifica] Tabella Note
It
è il tipo di implementazione di questo concettoOriginal:It
is the type implementing this conceptThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.T
è il std::iterator_traits<It>::value_type tipoOriginal:T
is the type std::iterator_traits<It>::value_typeThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.reference
è il std::iterator_traits<It>::reference tipoOriginal:reference
is the type std::iterator_traits<It>::referenceThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.difference
è il std::iterator_traits<It>::difference_type tipoOriginal:difference
is the type std::iterator_traits<It>::difference_typeThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.i
,a
,b
sono oggetti di tipoIt
oconst It
Original:i
,a
,b
are objects of typeIt
orconst It
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.r
è un valore di tipoIt&
Original:r
is a value of typeIt&
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.n
è un numero intero didifference
tipoOriginal:n
is an integer of typedifference
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le norme di cui sopra implicano che RandomAccessIterator implementa anche
LessThanComparable
.Original:
The above rules imply that RandomAccessIterator also implements
LessThanComparable
.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.
Un
mutable RandomAccessiterator
è un BidirectionalIterator
che soddisfa inoltre i requisiti OutputIterator
.Original:
A
mutable RandomAccessiterator
is a BidirectionalIterator
that additionally satisfies the OutputIterator
requirements.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.