This works so far: auto funcAttr = functionAttributes!(fun); if (FunctionAttribute.pure_ & funcAttr) s ~= " pure"; if (FunctionAttribute.nothrow_ & funcAttr) s ~= " nothrow"; if (FunctionAttribute.ref_ & funcAttr) s ~= " ref"; if (!isMutable!(typeof(fun))) s ~= " const";
But it's curious that FunctionAttributes has no const, immutable, inout or shared...