Map Purity

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 28 10:36:55 PDT 2015


On Sunday, 28 June 2015 at 16:28:20 UTC, jmh530 wrote:
> Thanks for the reply. Two follow ups: 1) Does labeling a 
> template as pure matter if the compiler infers it anyway? 2) 
> Does the compiler also infer anything for @safe/nothrow in 
> templates?

1) It means you can't instantiate the template function with 
arguments that would make it non-pure.
2) Yes, pure, nothrow, @safe, @nogc are all inferred.


More information about the Digitalmars-d-learn mailing list