I know that DStep generates CTFE functions to automatically make aliases for enum members so that the can be used without the enum name, as is done in C. DStep does it with a CTFE function, though it should also be possible with a mixin template.
Here is my attempt so far, using a mixin template:
template enumMixin(Enum) {
private import std.traits;
static foreach(member; EnumMembers!Enum) static if (__traits(isDeprecated, member))
{
private alias m = __traits(identifier, member);
alias m = member;
}
};
It hasn't worked so far.