isStatic

Returns is the given thing is either a static function or a static declaration declaration

Members

Aliases

isStatic
alias isStatic = Alias!(__traits(isStaticFunction, thing))
Undocumented in source.
isStatic
alias isStatic = Alias!(__traits(compiles, &thing))
Undocumented in source.

Examples

struct S {
    static long id;
    int age;
    static string name() {
        return "name";
    }
    void update(bool force) { }
}

isStatic!(S.id); // true
isStatic!(S.age); // false
isStatic!(S.name); // true
isStatic!(S.update); // false

Meta