buildCopyCtor

Generates a copy constructor if needCopyCtor() returns true. The generated copy constructor will be of the form: this(ref return scope inout(S) rhs) inout { this.field1 = rhs.field1; this.field2 = rhs.field2; ... }

bool
buildCopyCtor

Parameters

sd StructDeclaration

the struct for which the copy constructor is generated

sc Scope*

the scope where the copy constructor is generated

Return Value

Type: bool

true if struct sd defines a copy constructor (explicitly or generated), false otherwise.

Meta