hasNestedMember

Test existance of the nested member (or not nested).

Members

Variables

hasNestedMember
enum bool hasNestedMember;
Undocumented in source.
hasNestedMember
enum bool hasNestedMember;
Undocumented in source.
hasNestedMember
enum bool hasNestedMember;
Undocumented in source.
memberSplited
enum string[] memberSplited;
Undocumented in source.

Parameters

T

The type where member are nested

members

the member to test (e.g. "foo.bar.baz")

Examples

static class A {
    int bar;
}

static class B {
    A foo = new A();
}

static class C {
    B bar = new B();
}

static assert(hasNestedMember!(B, "foo.bar"));
static assert(!hasNestedMember!(B, "data.bar"));
static assert(!hasNestedMember!(B, "foo.baz"));
static assert(hasNestedMember!(B, "foo"));
static assert(!hasNestedMember!(B, "fooz"));
static assert(!hasNestedMember!(C, "bar.foo.baz"));
static assert(hasNestedMember!(C, "bar.foo.bar"));

Meta