Partager via


checked_array_iterator::operator-=

Décrémente un offset spécifié d' checked_array_iterator.

checked_array_iterator<_Iterator>& operator-=(
   difference_type _Off
);

Paramètres

  • _Off
    Le compenser par lequel pour incrémenter l'itérateur.

Valeur de retour

Une référence à l'élément traité par checked_array_iterator.

Notes

Pour plus d'informations, consultez Itérateurs vérifiés.

Exemple

// checked_array_iterators_op_minus_eq.cpp
// compile with: /EHsc
#include <vector>
#include <iostream>

int main() {
   using namespace stdext;
   using namespace std;
   int a[] = {6, 3, 77, 199, 222};
   int b[5];
   copy(a, a + 5, checked_array_iterator<int*>(b,5));

   checked_array_iterator<int*> checked_output_iterator(b,5);

   checked_output_iterator += 3;
   cout << *checked_output_iterator << endl;
   checked_output_iterator -= 2;
   cout << *checked_output_iterator << endl;
}
  

Configuration requise

en-tête : <iterator>

stdext del'espace de noms :

Voir aussi

Référence

checked_array_iterator Class

Modèles Standard