3 ms·
>Nothrow and Pure are not part of the type signature of functions Actually they are. Take a look at this example: void main() { int delegate(int) @safe n
by EvenThisAcronym 9y ago
>Nothrow and Pure are not part of the type signature of functions
Actually they are. Take a look at this example:
void main()
{
int delegate(int) @safe nothrow @nogc pure f;
//This looks like something bad is happening, but the delegate literal
//actually has the proper attributes inferred so it Just Works
f = delegate(int) { return 0; };
int delegate(int) g;
f = g; //Fails, as it should
}