Are there any library APIs that allow this:

struct S {
    int[] arr;
}

void main() {
    const a = S([1,2,3]);
    S b = a.copy; // deep dup/copy
}


I'd also like to avoid implementing a copy constructor for each type.

Reply via email to