Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

13.3 Iterators

Since the drafting of the ANSI/ISO Standard C++ Library, there are now two kinds of iterators available for use in the Essential Tools Module: the traditional iterators which we describe in detail throughout this manual, and the new "Standard Library" iterators. For more information about using the iterators now mandated by the standard, we refer you to the manual which came with your version of the Standard C++ Library. In this Essential Tools Module manual, unless we specifically say otherwise, an iterator refers to a traditional iterator.

Immediately after construction, the position of an Essential Tools Module iterator is formally undefined. You must advance it or position it before it has a well-defined position. The rule of thumb is "advance and then return." If the end of the collection has been reached, the return value after advancing will be special, either false or nil, depending on the type of iterator.

Hence, the proper idiom is:



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.