I have a structure like, used by other structures:

    struct A {
        int[] data;
        this(this) { data = data.dup; }
    }

I am trying to upgrade it to use copy constructor:

    struct A {
        int[] data
        this(ref return scope A rhs) { data = ths.data.dup; }
    }

Generating an `inout` copy constructor for `struct B` failed, therefore instances of it are uncopyable

What is an `inout` copy constructor? What should I change in A?

Reply via email to