hasStaticMember

Determines whether the type T has a static method named member.

Members

Aliases

Member
alias Member = Alias!(__traits(getMember, T, member))
Undocumented in source.

Variables

hasStaticMember
enum bool hasStaticMember;
Undocumented in source.
hasStaticMember
enum bool hasStaticMember;
Undocumented in source.
hasStaticMember
enum bool hasStaticMember;
Undocumented in source.

Parameters

T

Aggregate type.

member

Symbol name.

Return Value

$(D_KEYWORD true) if member is a static method of T, $(D_KEYWORD false) otherwise.

Examples

static struct S
{
     int member1;
     void member2()
     {
     }
     static int member3;
     static void member4()
     {
     }
     static void function() member5;
}
static assert(!hasStaticMember!(S, "member1"));
static assert(!hasStaticMember!(S, "member2"));
static assert(hasStaticMember!(S, "member3"));
static assert(hasStaticMember!(S, "member4"));
static assert(hasStaticMember!(S, "member5"));

Meta