[Issue 17526] Add a set method for AA

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 7 09:16:03 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17526

--- Comment #3 from hsteoh at quickfur.ath.cx ---
@Vladimir: you have a good point, it should still be possible to append stuff
to the AA.

What about a const overload to opIndexAssign that lets you assign to a new key,
but aborts if the key already exists?  I'm a little hesitant about adding a
whole new method to set a key in an AA.  I'm not sure what to do about the
abort... throw an AssertError? RangeError?

--


More information about the Digitalmars-d-bugs mailing list