checked_iterator::operator!=

Tests two checked_iterators for inequality.

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

Parameters

  • _Right
    The checked_iterator against which to check for inequality.

Remarks

For more information, see Checked Iterators.

Example

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

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

   if (VChkIterend != VChkIterend2)
      cout << "checked iterators are not equal" << endl;
   else
      cout << "checked iterators are equal" << endl;

   VChkIterend++;

   if (VChkIterend != VChkIterend2)
      cout << "checked iterators are not equal" << endl;
   else
      cout << "checked iterators are equal" << endl;
}

checked iterators are equal
checked iterators are not equal

Requirements

Header: <iterator>

Namespace: stdext

See Also

Reference

checked_iterator Class

Standard Template Library

Other Resources

checked_iterator Members