AA's and mutating keys

BCS BCS at pathlink.com
Wed Oct 31 13:39:26 PDT 2007


Steven Schveighoffer wrote:

> I am running into this very situation, so I want to know whether an AA will 
> dup the key automatically or if I have to do it myself.
> 

AA's do NOT dup the string. AA's should requirer that keys be invariant.

It's a bit expensive but I try to so this

int[char[]] a;
char[] s = something();
a[a.dup] = 5l;


More information about the Digitalmars-d-learn mailing list