import std.traits: isMutable;
struct S {
    immutable int i = 3;
}

pragma(msg, isMutable!S);

void main() {
    S s;
    s = S();
}

And is there a trait that takes the transitivity of immutability in to account?

Cheers,
- Ali

Reply via email to