Prevent self-comparison without taking the address

Dom DiSc dominikus at scherkl.de
Thu Jul 25 14:05:50 UTC 2024


On Thursday, 25 July 2024 at 13:20:59 UTC, IchorDev wrote:
> On Thursday, 25 July 2024 at 13:01:53 UTC, Dennis wrote:
>> That's true for the other function attributes, but `@safe:` 
>> actually does penetrate scopes
>
> The spec doesn’t mention this at all! Is this the case for any 
> other `AttributeSpecifier` declarations?

As he said: no. It's only true for @safe:


But that doesn't answer my question.
You said it is not the same. But then: is there another way to 
translate the C++ pattern in a @safe way?


More information about the Digitalmars-d-learn mailing list