Optional tags and attributes

Stanislav Blinov stanislav.blinov at gmail.com
Fri Jan 17 19:38:46 PST 2014


On Saturday, 18 January 2014 at 03:22:43 UTC, H. S. Teoh wrote:
> On Fri, Jan 17, 2014 at 10:02:44PM -0500, Steven Schveighoffer 
> wrote:

> See https://d.puremagic.com/issues/show_bug.cgi?id=10329

> If so, then you can just take out the nothrow clause and it 
> should work?
> (But since I haven't tested this yet I could be wrong.)

Hmm... It certainly *looks* that way, but I don't have a local 
pull of the compiler, so can't test either. But if it's true, 
that's great!


> Hmm. Would functionAttributes and SetFunctionAttributes in 
> std.traits
> help somehow? Not sure how you might actually use them to 
> declare
> methods with desired attributes, though. But maybe there's a 
> way.

functionAttributes can be used for inference (see isNoThrow in my 
first post). But alas, currently attributes can't be mixed-in or 
otherwise conditionally specified (without resorting to static 
if), at least I don't know one, what prompted me to start this 
topic in the first place.


More information about the Digitalmars-d mailing list