Optional tags and attributes

Stanislav Blinov stanislav.blinov at gmail.com
Fri Jan 17 18:50:07 PST 2014


On Saturday, 18 January 2014 at 02:38:28 UTC, H. S. Teoh wrote:

> What's wrong with just letting the compiler infer the maximal 
> function
> attributes?

...

> Sadly, this only works for template functions currently -- so I 
> still
> had to annotate the various method()'s by hand, but if you were 
> to turn
> them into template functions too, their attributes will also be 
> inferred
> automatically.

Oh, I see now where it went the wrong way. From my own example, 
of course :)

Surely I was meaning:

class Careful(T) {
//...
   void thisIsSoPolymorphic() nothrow(isNoThrow!(T.foo)) { ... }
//...
}

Something to that extent. So that yes, the function itself is not 
a template.


More information about the Digitalmars-d mailing list