attribute alias? eg: asm @my_alias {...} alias my_alias=pure nothrow @trusted @nogc;

Timothee Cour via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 30 21:02:10 PDT 2015


Is there a way to alias attributes?

alias my_alias=pure nothrow @trusted @nogc;
asm @my_alias {...}

This came up here:
https://github.com/Hackerpilot/libdparse/issues/50

Or at least to do the following in a less ugly way?

static if(__VERSION__<2067) enum asm_att=``;
else enum asm_att=`pure nothrow @nogc`;

//lots of statements like this
mixin(`asm `~asm_att~` {... }`);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150530/ea619e08/attachment.html>


More information about the Digitalmars-d-learn mailing list