"default" keyword as function attribute

ZombineDev via Digitalmars-d digitalmars-d at puremagic.com
Sat Mar 19 08:34:40 PDT 2016


On Saturday, 19 March 2016 at 15:09:00 UTC, Jakob Ovrum wrote:
> On Saturday, 19 March 2016 at 14:55:00 UTC, Jakob Ovrum wrote:
>> Maybe there is a better way, or maybe we should move forward 
>> with it.
>
> Maybe an alternative would be to simply ignore explicit 
> attributes on templated functions, or at least ignore 
> attributes on them applied with `attr:` or `attr { … }`. This 
> could be a problem for `@trusted`.

+ 1
This seams very reasonable. When writing templates one should 
almost always rely on attribute inference.

As for negation of attributes, I also support the approved by 
Andrei syntax:
final(false), @nogc(useGC == AllocateGC.no), etc.


More information about the Digitalmars-d mailing list