Last update February 23, 2009

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


FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: February 23, 2009 3:47 (diff))