Sunday, January 8, 2012

stl Iterator Adapters

stl Iterator Adapters c++

Iterators are pure abstractions: Anything that behaves like an iterator is an iterator. For this reason, you can write classes that have the interface of iterators but do something (completely) different. The C++ standard library provides several predefined special iterators: iterator adapters.
 
They are more than auxiliary classes; they give the whole concept a lot more power. The following subsections introduce three iterator adapters:  
  1. Insert iterators
  2. Stream iterators
  3. Reverse iterators
See Also:

No comments:

Post a Comment