Doc Comments /
Traits
Messages
Virtual Functions
__traits defines a virtual function as any function that appears in a vtbl. This includes final functions. In order to get functions that can be overridden, you must filter the list with (!__traits(isFinalFunction)).
Determining if something compiles
__traits(compiles) will die on something with mismatched parentheses (and some other problems). To avoid these problems, use a string mixin:static if (__traits (compiles, mixin ("&(foo"))) {}
Links
Corresponding page in the D Specification