checked_iterator::operator==
Tests two checked_iterators for equality.
template <class Iter2>
bool operator==(
const checked_iterator<Container, Iter2>& _Right) const;
Parameters
- _Right
The checked_iterator against which to check for equality.
Remarks
For more information, see Checked Iterators.
Example
// checked_iterators_opeq.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 equal" << endl;
else
cout << "checked iterators are not equal" << endl;
VChkIterend++;
if (VChkIterend == VChkIterend2)
cout << "checked iterators are equal" << endl;
else
cout << "checked iterators are not equal" << endl;
}
checked iterators are equal
checked iterators are not equal
Requirements
Header: <iterator>
Namespace: stdext