[Issue 21929] delegates capture do not respect scoping

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 20 10:58:26 UTC 2021


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

--- Comment #8 from deadalnix <deadalnix at gmail.com> ---
(In reply to a11e99z from comment #7)
> C++ byRef & byValue capturing is more viable.

You'll not that C++'s std::function will allocate on heap if you capture. The
equivalent code in C++ WILL allocate in a loop too.

--


More information about the Digitalmars-d-bugs mailing list