Conditional Attributes

Marcel marcelpi97 at gmail.com
Tue Feb 18 17:11:55 UTC 2020


Hello!

Say I have a struct where every member function can either be 
static or not depending on a template parameter. Is there a 
simple way to do this? Like, for example:

struct Foo(Condition)
{
    static if (Condition) static:

    void Bar() {}
    void Baz() {}

}


More information about the Digitalmars-d-learn mailing list