On Thursday, 1 January 2015 at 18:08:52 UTC, Andrej Mitrovic via Digitalmars-d-learn wrote:
On 1/1/15, H. S. Teoh via Digitalmars-d-learn
<digitalmars-d-learn@puremagic.com> wrote:
If you need consistent ordering of values, you probably want a different
data structure, like an ordered map

This one works nicely on D1, I'd imagine the D2 port works just the same:

https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/util/container/SortedMap.d

You could implement an OrderedMap!(Key, Value) via RedBlackTree!(Tuple!(Key, Value), (a,b) => a[0] < b[0]).

Reply via email to