Associative Array c'tor

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 12 02:42:16 PDT 2016


On Tuesday, 12 July 2016 at 03:38:44 UTC, Bahman Movaqar wrote:
> Now I understand.
> This is tricky --could introduce hard to find bugs.  Is there 
> anyway to
> make sure it doesn't happen?  Such as giving the AA a default 
> empty
> value on the declaration line --like `string[int] a = []`?

no. the only thing you can do is to add something to aa and 
immediately `.clear`


More information about the Digitalmars-d-learn mailing list