Espaces de noms
Variantes
Actions

<div class="t-tr-text">Concepts C + +:<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

De cppreference.com
< cpp‎ | concept

 
 
C + + concepts
De base
Original:
Basic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Bibliothèque échelle
Original:
Library-Wide
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Récipient
Original:
Container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Éléments de conteneurs
Original:
Container Elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterator
Original:
Iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Nombres aléatoires
Original:
Random Numbers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Simultanéité
Original:
Concurrency
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
BasicLockable (C++11)
Lockable (C++11)
TimedLockable (C++11)
Mutex (C++11)
TimedMutex (C++11)
Autre
Original:
Other
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Un RandomAccessIterator est un BidirectionalIterator qui peut être déplacé pour pointer vers n'importe quel élément de la constante de temps .
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.
Un pointeur standard est un exemple d'un type qui répond à ce concept .
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.

[modifier]Exigences

En plus de l'exigence ci-dessus, pour un type de It être un RandomAccessIterator, a cas, b, i et r de It doit:
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.
ExpressionReturnEquivalent expressionNotes
r += nIt&if(n>=0)

   while(n--)++r;
else
   while(n++)--r;
return r;

  • n peut être positif ou négatif
    Original:
    n can be both positive or negative
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Complexité constante (c'est-à-dire l'expression équivalente ne peut être utilisé comme mise en œuvre)
    Original:
    Constant complexity (that is, the equivalent expression cannot be used as implementation)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
i + nItIt temp = i;

return temp += n;

n + iIti + n
r -= nIt&return r +=-n;
i - nItIt temp = i;

return temp -= n;

n - iIti - n
b - adifferencenreturns n such that a+n==b
i[n]convertible to reference*(i + n)
a < bcontextually convertible to boolb - a >0Strict total ordering relation:
  • !(a < a)
  • si a < b puis !(b < a)
    Original:
    if a < b then !(b < a)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • si a < b et b < c puis a < c
    Original:
    if a < b and b < c then a < c
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • a < b ou b < a ou a == b
    (exactement l'une des expressions est vraie)
    Original:
    a < b or b < a or a == b
    (exactly one of the expressions is true)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
a > bcontextually convertible to boolb < aTotal ordering relation opposite to a < b
a >= bcontextually convertible to bool!(a < b)
a <= bcontextually convertible to bool!(a > b)

[modifier]Notes du tableau

  • It est le type de mise en œuvre de ce concept
    Original:
    It is the type implementing this concept
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • T est le type de std::iterator_traits<It>::value_type
    Original:
    T is the type std::iterator_traits<It>::value_type
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • reference est le type de std::iterator_traits<It>::reference
    Original:
    reference is the type std::iterator_traits<It>::reference
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • difference est le type de std::iterator_traits<It>::difference_type
    Original:
    difference is the type std::iterator_traits<It>::difference_type
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • i, a, b sont des objets de type It ou const It
    Original:
    i, a, b are objects of type It or const It
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • r est une valeur de type de It&
    Original:
    r is a value of type It&
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • n est un nombre entier de difference type
    Original:
    n is an integer of type difference
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Les règles ci-dessus impliquent que RandomAccessIterator met également en œuvre 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.
Un mutable RandomAccessiterator est un BidirectionalIterator qui satisfait en outre aux exigences 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.
close