AA getLValue

Martin Nowak dawg at dawgfoto.de
Tue Mar 27 02:35:51 PDT 2012


Does anybody know an efficient way to get/create-if-missing an lvalue AA  
entry.
I commonly resort to this, but it uses three lookups.

auto p = key in aa;
if (p is null)
{
     aa[key] = inital;
     p = key in aa;
}
//...


More information about the Digitalmars-d mailing list