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 a local clone.


Compiler implementation of the D programming language.

Source: dstruct.d

FuncDeclaration search_toString(StructDeclaration sd);
Search sd for a member function of the form: extern (D) string toString();
StructDeclaration sd struct declaration to search
FuncDeclaration of toString() if found, null if not
void semanticTypeInfo(Scope* sc, Type t);
Request additional semantic analysis for TypeInfo generation.
Scope* sc context
Type t type that TypeInfo is being generated for
class StructDeclaration: dmd.aggregate.AggregateDeclaration;
All struct declarations are an instance of this.
final bool fit(Loc loc, Scope* sc, Expressions* elements, Type stype);
Fit elements[] to the corresponding types of the struct's fields.
Loc loc location to use for error messages
Scope* sc context
Expressions* elements explicit arguments used to construct object
Type stype the constructed object type.
false if any errors occur, otherwise true and elements[] are rewritten for the output.
final bool isPOD();
Determine if struct is POD (Plain Old Data).
POD is defined as:
  1. not nested
  2. no postblits, destructors, or assignment operators
  3. no ref fields or fields that are themselves non-POD
The idea being these are compatible with C structs.
true if struct is POD
class UnionDeclaration: dmd.dstruct.StructDeclaration;
Unions are a variation on structs.