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~` {... }`);

Reply via email to