xxxxxxxxxx
struct Foo { string name = "unknown"; }
version(BAD)
@Foo int bar;
else
@Foo() int bar;
static foreach (uda; __traits(getAttributes, bar))
{
static if (is(typeof(uda) == Foo))
pragma(msg, "bar is @Foo");
}