次の方法で共有


checked_array_iterator::operator>=

演算子の左側の checked_array_iterator が右側の checked_array_iterator 以上でテスト。

bool operator>=(
   const checked_array_iterator<_Iterator>& _Right
) const;

パラメーター

  • _Right
    比較対象の checked_array_iterator

解説

詳細については、「チェックを行う反復子」を参照してください。

使用例

// checked_array_iterators_opgteq.cpp
// compile with: /EHsc
#include <iterator>
#include <iostream> 

using namespace std;
using namespace stdext;

int main() {
   int a[] = {0, 1, 2, 3, 4};
   int b[5];
   copy(a, a + 5, checked_array_iterator<int*>(b,5));
   copy(a, a + 5, checked_array_iterator<int*>(b,5));

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

   if (checked_output_iterator2 >= checked_output_iterator)
      cout << "checked_output_iterator2 is greater than or equal to checked_output_iterator" << endl;
   else
      cout << "checked_output_iterator2 is less than checked_output_iterator" << endl;

   copy (a, a + 5, checked_output_iterator);
   checked_output_iterator++;

   if (checked_output_iterator2 >= checked_output_iterator)
      cout << "checked_output_iterator2 is greater than or equal to checked_output_iterator" << endl;
   else
      cout << "checked_output_iterator2 is less than checked_output_iterator" << endl;
}
  

必要条件

ヘッダー: <iterator>

名前空間: の stdext

参照

関連項目

checked_array_iterator Class

標準テンプレート ライブラリ