[Issue 15370] Some way to manually allocate the closure for delegates to nested functions.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 9 21:42:51 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=15370
Mathias LANG <pro.mathias.lang at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |pro.mathias.lang at gmail.com
Resolution|--- |INVALID
--- Comment #1 from Mathias LANG <pro.mathias.lang at gmail.com> ---
You can manually allocate a closure by using a struct.
You allocate the struct, and return it, its `opCall`, or any other member
function. As for using allocators - I think we're still far from that.
Anything of that magnitude would need to come in the form of a DIP - there's
just too much implication to fully capture it here.
Since it's possible to manually allocate, closing this as INVALID.
--
More information about the Digitalmars-d-bugs
mailing list