How to copy const object?
Mitacha
mateusz.mitaszka at gmail.com
Thu Feb 27 11:28:11 UTC 2020
I've a const struct object and I'd like to make a mutable copy of
it.
Struct definition contains string and an array of structs.
```
struct A {
string a;
B[] b;
}
struct B {
string a;
string b;
}
```
As far as I can tell copy constructor isn't generated for struct
`A` because it contains an array. Correct?
Is there an idiomatic way to create copy of a const object?
More information about the Digitalmars-d-learn
mailing list