On Monday, 25 February 2019 at 20:41:58 UTC, Paolo Invernizzi wrote:
Honestly, I've not understood the rationale or the covered use case in letting the copy ctor mutate the ref source parameters...
Sincerely, without polemical intent.

- P

Because D's const is transitive, you can't copy-construct a mutable object from a const source:

struct S
{
    int[] stuff;
    this(const ref S source) {
stuff = source.stuff; // Error: can't assign const(int[]) to int[]
    }
}

Reply via email to