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
aliak via Digitalmars-d-learn Fri, 27 Jul 2018 06:16:24 -0700
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