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: