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.
dmd.dstruct
Struct and union declarations.
Specification Structs, Unions
Authors:
License:
Source dstruct.d
Documentation https://dlang.org/phobos/dmd_dstruct.html
- FuncDeclaration
search_toString
(StructDeclarationsd
); - Search sd for a member function of the form: extern (D) string toString();Parameters:
StructDeclaration sd
struct declaration to search Returns:FuncDeclaration of toString() if found, null if not - void
semanticTypeInfo
(Scope*sc
, Typet
); - Request additional semantic analysis for TypeInfo generation.Parameters:
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 void
determineTypeProperties
(); - Compute cached type properties for TypeStruct
- final bool
isPOD
(); - Determine if struct is POD (Plain Old Data).POD is defined as:
- not nested
- no postblits, destructors, or assignment operators
- no ref fields or fields that are themselves non-POD
Returns:true if struct is POD - final bool
hasCopyConstruction
(); - Determine if struct has copy construction (copy constructor or postblit)Returns:true if struct has copy construction
- final bool
hasRegularCtor
(boolcheckDisabled
= false); - Verifies whether the struct declaration has a constructor that is not a copy constructor. Optionally, it can check whether the struct declaration has a regular constructor, that is not disabled.Parameters:
bool checkDisabled
if the struct has a regular non-disabled constructor Returns:true, if the struct has a regular (optionally, not disabled) constructor, false otherwise.
- bool
_isZeroInit
(Expressionexp
); - Determine if exp is all binary zeros.Parameters:
Expression exp
expression to check Returns:true if it's all binary 0 - class
UnionDeclaration
: dmd.dstruct.StructDeclaration; - Unions are a variation on structs.
Copyright © 1999-2024 by the D Language Foundation | Page generated by
Ddoc on Wed Dec 18 08:51:41 2024