dmd.dstruct
Struct and union declarations.
Specification: Structs, Unions
License
Source: dstruct.d
Documentation: https://dlang.org/phobos/dmd_dstruct.html
-
Declaration
FuncDeclarationsearch_toString(StructDeclarationsd);Search
sdfor a member function of the form:extern (D) string toString();Parameters
StructDeclarationsdstruct declaration to search
Return Value
FuncDeclaration of
toString()if found,nullif not -
Declaration
voidsemanticTypeInfo(Scope*sc, Typet);Request additional semantic analysis for TypeInfo generation.
Parameters
Scope*sccontext
Typettype that TypeInfo is being generated for
-
Declaration
classStructDeclaration: dmd.aggregate.AggregateDeclaration;All
structdeclarations are an instance of this.-
Declaration
final boolfit(ref const Locloc, Scope*sc, Expressions*elements, Typestype);Fit
elements[] to the corresponding types of the struct's fields.Parameters
Locloclocation to use for error messages
Scope*sccontext
Expressions*elementsexplicit arguments used to construct object
Typestypethe constructed object type.
Return Value
falseif any errors occur, otherwisetrueandelements[] are rewritten for the output. -
Declaration
final boolisPOD();Determine if struct is POD (Plain Old Data).
Discussion
POD is defined as:
- not nested
- no postblits, destructors, or assignment operators
- no
reffields or fields that are themselves non-POD
Return Value
trueif struct is POD
-
-
Declaration
classUnionDeclaration: dmd.dstruct.StructDeclaration;Unions are a variation on structs.