On 2014-01-18 04:02, Steven Schveighoffer wrote:
I think a "use the attributes of X" would be a general enough tool.Something like: void thisIsSoPolymorphic() attrOf(T.foo)
Yet another case for AST macros:
class Careful (T)
{
void thisIsSoPolymporphic () @inferAttributes(T.foo) { }
}
macro inferAttributes (Context context, Ast!(Symbol) symbol, Declaration
decl)
{
foreach (attr ; symbol.attributes)
decl.attributes ~= attr;
return decl;
}
--
/Jacob Carlborg
