auto & class members

Jonathan M Davis newsgroup.d at jmdavisprog.com
Mon May 21 20:17:04 UTC 2018


On Monday, May 21, 2018 16:05:00 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> On 5/21/18 3:22 PM, Jonathan M Davis wrote:
> > That's basically what I was suggesting that he do, but I guess that I
> > wasn't clear enough.
>
> Well one thing that seems clear from this example -- we now have
> __traits(isSame) to tell if lambdas are the same, but it looks like the
> compiler doesn't subscribe to that belief...
>
> https://run.dlang.io/is/FW3mVq
>
> We should fix that...

Yeah. That part of lambdas has always been a problem. My guess here is that
the problem stems from the fact that they're declared in separate scopes,
but I don't know. Regardless of the reason for the failure though, that
example really needs to work, or most anything that cares about lambdas
being the same is going to have problems.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list