On 12/29/21 5:14 PM, Paul Backus wrote:

Therefore, when you write your own copy constructors, you should always use `inout` if possible, so that compiler-generated copy constructors will be able to copy instances of your struct that appear as members of other structs.

Excellent point. I noticed a typo in the documentation:

struct A
{
    this(ref return scope inout A rhs) immutable {}
}

That 'immutable' should be 'inout', right?

Ali

Reply via email to