struct S { int m; static int sm; void f() {} static void sf() {} @property int rp() { return m; } @property void wp(int) {} } static assert(!hasProperty!(S, "na")); static assert(!hasProperty!(S, "m")); static assert(!hasProperty!(S, "sm")); static assert(!hasProperty!(S, "f")); static assert(!hasProperty!(S, "sf")); static assert( hasProperty!(S, "rp")); static assert( hasProperty!(S, "wp"));
Tells you if a name is a member and property in a type