共用方式為


checked_iterator::base

Recovers the underlying iterator from its checked_iterator.

InputIterator base( ) const;

Remarks

For more information, see Checked Iterators.

Example

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

int main() {
   using namespace std;

   vector<int> V1;

   for (int i = 0; i < 10 ; i++)
      V1.push_back(i);

   vector <int>::iterator bpos;

   stdext::checked_iterator< vector<int> > rpos(V1, V1.begin());
   rpos++;

   bpos = rpos.base ( );
   cout << "The iterator underlying rpos is bpos & it points to: " 
        << *bpos << "." << endl;
}

The iterator underlying rpos is bpos & it points to: 1.

Requirements

Header: <iterator>

Namespace: stdext

See Also

Concepts

checked_iterator Class

checked_iterator Members

Standard Template Library