On Friday, 6 April 2012 at 15:16:37 UTC, Piotr Szturmaj wrote:
__traits(getAttributes, x)

Note that my proposal from a couple weeks ago did it this way.

getAttributes returned a TypeTuple. You'd loop through it
with is(typeof()) to extract a specific one.

The key is the type name.

The value is whatever your thing evaluated to:

@attr(10+2) decl;

conceptually the same as

enum tmp = 10+2;
decl.annotations ~= tmp;


Reply via email to