DIP 1028---Make @safe the Default---Community Review Round 1
Steven Schveighoffer
schveiguy at gmail.com
Fri Jan 3 16:11:25 UTC 2020
On 1/3/20 10:48 AM, Eugene Wissner wrote:
> On Friday, 3 January 2020 at 15:38:02 UTC, Steven Schveighoffer wrote:
>> This is erroneous. It marks all templates @system, which would
>> otherwise be inferred @safe.
>>
>> And it does not mark member functions.
>
>
> I think it applies only to other attributes.
>
> import std.traits;
>
> @system:
>
> struct S {
> void func()()
> {
> }
> }
>
> static assert(!isSafe!(S.func!()));
It seems you are right! But I could have sworn I had to mark member
functions as @safe when modifying projects to be @safe. I'll have to
re-check and see if there are cases where it doesn't work.
-Steve
More information about the Digitalmars-d
mailing list