associative arrays: how to insert key and return pointer in 1 step to avoid searching twice
Timothee Cour via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 5 18:17:00 PDT 2016
is there a way to do this efficiently with associative arrays:
aa[key]=value;
auto ptr=key in aa;
without suffering the cost of the 2nd search (compiler should know ptr
during aa[key]=value but it's not exposed it seems)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160905/e8e7f602/attachment.html>
More information about the Digitalmars-d
mailing list