isManifestAssignable

Is true if T.name is a manifest constant, built-in type field, or immutable static.

template isManifestAssignable (
T
string name
) {
enum isManifestAssignable;
}

Examples

struct A
{
    int m;
    static immutable int sim = 1;
    enum e = 1;
}
static assert(!isManifestAssignable!(A*, "na"));
static assert(!isManifestAssignable!(A, "na"));
static assert(!isManifestAssignable!(A, "m"));
static assert(isManifestAssignable!(A, "e"));
static assert(isManifestAssignable!(A, "sim"));

Meta