On Thursday, 28 April 2016 at 03:15:36 UTC, Adam D. Ruppe wrote:
On Thursday, 28 April 2016 at 00:14:41 UTC, deadalnix wrote:
More generally, it is not clear what is allowed to do for
merging functions. In C/C++ it is assumed that different
function MUST have different identities.
I don't think this needs to hold true for anonymous functions
though. If they have the same representation twice, it is
arguably just the same function referenced twice.
I'm not enough of a language lawyer to know that. But I can tell
you that compiler do not take advantage of this at this stage.
Maybe it is because lambda are fairly new, I'm not sure.