다음을 통해 공유


deque::crend

Returns a const iterator that addresses the location succeeding the last element in a reversed deque.

const_reverse_iterator crend( ) const;

반환 값

A const reverse random-access iterator that addresses the location succeeding the last element in a reversed deque 클래스 (the location that had preceded the first element in the unreversed deque).

설명

crend is used with a reversed deque just as array::cend is used with a deque.

With the return value of crend (suitably decremented), the deque object cannot be modified.

crend can be used to test to whether a reverse iterator has reached the end of its deque.

이 crend 로 반환된 값은 역참조 되지 않아야 합니다.

예제

// deque_crend.cpp
// compile with: /EHsc
#include <deque>
#include <iostream>

int main( )
{
   using namespace std;   
   deque <int> v1;
   deque <int>::const_reverse_iterator v1_rIter;
   
   v1.push_back( 1 );
   v1.push_back( 2 );

   for ( v1_rIter = v1.rbegin( ) ; v1_rIter != v1.rend( ) ; v1_rIter++ )
      cout << *v1_rIter << endl;
}
  

요구 사항

헤더: <deque>

네임스페이스: std

참고 항목

참조

deque 클래스

표준 템플릿 라이브러리