May 31, 2015 attribute alias? eg: asm @my_alias {...} alias my_alias=pure nothrow @trusted @nogc; | ||||
|---|---|---|---|---|
| ||||
Attachments:
| 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~` {... }`);
| |||
June 01, 2015 Re: attribute alias? eg: asm @my_alias {...} alias my_alias=pure nothrow @trusted @nogc; | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Timothee Cour | On Sunday, 31 May 2015 at 04:02:19 UTC, Timothee Cour wrote: > Is there a way to alias attributes? > > alias my_alias=pure nothrow @trusted @nogc; > asm @my_alias {...} I'm not sure if this will work for you, but check out the last part of this post: http://forum.dlang.org/post/sfwtxngbiamlketodjkg@forum.dlang.org Also, follow the link on this post: http://forum.dlang.org/post/mailman.1368.1428576462.3111.digitalmars-d-learn@puremagic.com Mike | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply