array::const_reverse_iterator

更新 : 2007 年 11 月

被制御シーケンスの定数反転反復子の型です。

typedef std::reverse_iterator<const_iterator> const_reverse_iterator;

解説

この型は、被制御シーケンスの定数反転反復子として使用できるオブジェクトを表します。

使用例

 

// std_tr1__array__array_const_reverse_iterator.cpp 
// compile with: /EHsc 
#include <array> 
#include <iostream> 
 
typedef std::tr1::array<int, 4> Myarray; 
int main() 
    { 
    Myarray c0 = {0, 1, 2, 3}; 
 
// display contents " 0 1 2 3" 
    for (Myarray::const_iterator it = c0.begin(); 
        it != c0.end(); ++it) 
        std::cout << " " << *it; 
    std::cout << std::endl; 
 
// display last element " 3" 
    Myarray::const_reverse_iterator it2 = c0.rbegin(); 
    std::cout << " " << *it2; 
    std::cout << std::endl; 
 
    return (0); 
    } 
 
 0 1 2 3
 3

必要条件

ヘッダー : <array>

名前空間 : std::tr1

参照

参照

<array>

array クラス (TR1)

array::reverse_iterator