This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This change implements a reversible iterator for multiset containers. An iterator can either be partial, visiting only some of the items in the container (in which case the start position is specified), or complete, visiting all of them. The iterator caches the start position during its construction, and that position value is used by First and Last to determine their associated return values. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-12-02 Matthew Heaney <heaney@adacore.com> * a-coormu.ads, a-ciormu.ads: Declare iterator factory function. * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete Iterator type. (Finalize): Decrement busy counter. (First, Last): Cursor return value depends on iterator node value. (Iterate): Use start position as iterator node value. (Next, Previous): Forward to corresponding cursor-based operation.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |