Iterator Operations

Figure 15.9 shows operations that can be performed on each iterator type. In addition to the operators shown for all iterators, iterators must provide default constructors, copy constructors and copy assignment operators. A forward iterator supports ++ and all of the input and output iterator capabilities. A bidirectional iterator supports -- and all the capabilities of forward iterators. A random access iterator supports all of the operations shown in the table. For input iterators and output iterators, it’s not possible to save the iterator then use the saved value later.

Image
Image

Fig. 15.9. Iterator operations for each type of iterator.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.4.181