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; ... }
Create aggregate destructor for struct/class by aggregating all the destructors in userDtors[] with the destructors for all the members. Sets ad's fieldDtor, aggrDtor, dtor and tidtor fields.
Create inclusive invariant for struct/class by aggregating all the invariants in invs[].
Build opAssign for a struct.
Build opEquals for struct. const bool opEquals(const S s) { ... }
Create inclusive postblit for struct by aggregating all the postblits in postblits[] with the postblits for all the members. Note the close similarity with AggregateDeclaration::buildDtor(), and the ordering changes (runs forward instead of backwards).
Build _xopCmp for TypeInfo_Struct int _xopCmp(ref const S p) const { return this.opCmp(p); }
Build _xopEquals for TypeInfo_Struct bool _xopEquals(ref const S p) const { return this == p; }
Build __xtoHash for non-bitwise hashing static hash_t xtoHash(ref const S p) nothrow @trusted;
Check given aggregate actually has an identity opAssign or not.
Merge function attributes pure, nothrow, @safe, @nogc, and @disable from f into s1.
We need an opEquals for the struct if any fields has an opEquals. Generate one if a user-specified one does not exist.
Builds struct member functions if needed and not defined by the user. Includes opEquals, opAssign, post blit, copy constructor and destructor.