[Issue 16362] `foreach (ref v; range)` with non-ref returning `.front()` missing dtors
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Aug 10 13:13:13 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16362
Ketmar Dark <ketmar at ketmar.no-ip.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #1607|0 |1
is obsolete| |
--- Comment #2 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
Created attachment 1608
--> https://issues.dlang.org/attachment.cgi?id=1608&action=edit
fix and test case, v2
remove `ref` only for types that needs dtor to be called. this *may* give some
speedup when `.front` returns structs without dtors.
--
More information about the Digitalmars-d-bugs
mailing list