View source code
Display the source code in ddmd/clone.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module ddmd.clone

Compiler implementation of the D programming language.

Functions

Name Description
buildDtor 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).
buildInv Create inclusive invariant for struct/class by aggregating all the invariants in invs[]. void _invariant() const [pure nothrow @trusted] { invs[0](), invs[1](), ...; }
buildOpAssign Build opAssign for struct. ref S opAssign(S s) { ... }
buildOpEquals Build opEquals for struct. const bool opEquals(const S s) { ... }
buildPostBlit 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).
buildXopCmp Build _xopCmp for TypeInfo_Struct static bool _xopCmp(ref const S p, ref const S q) { return p.opCmp(q); }
buildXopEquals Build _xopEquals for TypeInfo_Struct static bool _xopEquals(ref const S p, ref const S q) { return p == q; }
buildXtoHash Build _xtoHash for non-bitwise hashing static hash_t xtoHash(ref const S p) nothrow @trusted;
hasIdentityOpAssign Check given aggregate actually has an identity opAssign or not.
hasIdentityOpEquals Check given aggregate actually has an identity opEquals or not.
mergeFuncAttrs Merge function attributes pure, nothrow, @safe, @nogc, and @disable
needOpEquals We need an opEquals for the struct if any fields has an opEquals. Generate one if a user-specified one does not exist.

Authors

Walter Bright

License

Boost License 1.0

Comments