Udostępnij za pośrednictwem


checked_array_iterator::base

Recovers the underlying iterator from its checked_array_iterator.

_Iterator base() const;

Remarks

For more information, see Checked Iterators.

Example

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

int main() {
   using namespace std;

   int V1[10];

   for (int i = 0; i < 10 ; i+)
      V1[i] = i;

   int* bpos;

   stdext::checked_array_iterator<int*> rpos(V1, 10);
   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

Reference

checked_array_iterator Class

Standard Template Library

Other Resources

checked_array_iterator Members