Share via


checked_iterator::operator>=

Tests if the checked_iterator on the left side of the operator is greater than or equal to the checked_iterator on the right side.

template <class Iter2>
    bool operator>=(
        const checked_iterator<Container, Iter2>& _Right) const;

Parameters

  • _Right
    The checked_iterator to compare against.

Remarks

For more information, see Checked Iterators.

Example

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

int main() {
   using namespace std;   
   vector<int> V1( 10 );
   stdext::checked_iterator< vector<int> > VChkIter1(V1, V1.begin());
   stdext::checked_iterator< vector<int> > VChkIter2(V1, V1.begin());

   VChkIter1++;
   VChkIter2++;

   if (VChkIter1 >= VChkIter2)
      cout << "VChkIter1 is greater than or equal to VChkIter2" << endl;
   else
      cout << "VChkIter1 is not greater than or equal to VChkIter2" << endl;

   VChkIter2++;

   if (VChkIter1 >= VChkIter2)
      cout << "VChkIter1 is greater than or equal to VChkIter2" << endl;
   else
      cout << "VChkIter1 is not greater than or equal to VChkIter2" << endl;
}

VChkIter1 is greater than or equal to VChkIter2 VChkIter1 is not greater than or equal to VChkIter2

Requirements

Header: <iterator>

Namespace: stdext

See Also

Reference

checked_iterator Class

Standard Template Library

Other Resources

checked_iterator Members