auto & class members

Robert M. Münch robert.muench at
Tue May 22 08:43:38 UTC 2018

On 2018-05-21 20:17:04 +0000, Jonathan M Davis said:

> On Monday, May 21, 2018 16:05:00 Steven Schveighoffer via Digitalmars-d-
> learn wrote:
>> 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...
>> 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.

I think that's exactly the problem: I assumed that it's about the 
lambdas and associated types but would have never guessed that names, 
scope etc. play a role as well. Is this somewhere documented? Or at 
least a hint, would help a lot to be aware of this pitfall.

Robert M. Münch
smarter | better | faster

More information about the Digitalmars-d-learn mailing list