tango iterators and related questions

MLT none at anon.com
Tue Apr 21 07:08:03 PDT 2009


Steven Schveighoffer Wrote:

> On Tue, 21 Apr 2009 08:46:18 -0400, MLT <none at anon.com> wrote:

> dcollections+tango should do the trick for you.  It is incidentally what I  
> use (of course I wrote dcollections, so big surprise there ;)
> 

Good! I just managed to compile my first program using 0.02
BTW: the svn version gave me errors like: /usr/local/include/d/dcollections/TreeMap.d(96): Error: undefined identifier DefaultCompare
Maybe it has something to do with D2? I'm not sure.
0.02 worked, except that I had to manually ranlib the resulting library.

> You can submit an enhancement request to Tango to see if there is interest  
> in adding bi-directional iterator functionality to the SortedMap.  I know  
> there is some bidirectional support in e.g. circular lists.
> 

Yes. But the problem isn't so much the bi-directionality, and more just accessing where I currently am. Though of course with bi-directional iterators, I could go next, then prev, and see what I have where I am. Because next and prev are O(logN) this isn't SO cheap though.



More information about the Digitalmars-d-learn mailing list