Create inclusive destructor for struct/class by aggregating all the destructors in dtors[] with the destructors for all the members. Note the close similarity with StructDeclaration::buildPostBlit(), and the ordering changes (runs backward instead of forwards).
Build opAssign for struct. ref S opAssign(S s) { ... }
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 static bool __xopCmp(ref const S p, ref const S q) { return p.opCmp(q); }
Build __xopEquals for TypeInfo_Struct static bool __xopEquals(ref const S p, ref const S q) { return p == q; }
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.
Check given aggregate actually has an identity opEquals or not.
Merge function attributes pure, nothrow, @safe, @nogc, and @disable
We need an opEquals for the struct if any fields has an opEquals. Generate one if a user-specified one does not exist.
See Source File
$(DMDSRC _clone.d)
Copyright (c) 1999-2016 by Digital Mars, All Rights Reserved
Compiler implementation of the D programming language.