View source code
Display the source code in dmd/mtype.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 dmd.mtype

Compiler implementation of the D programming language.

Documentation

https://dlang.org/phobos/dmd_mtype.html

Coverage

https://codecov.io/gh/dlang/dmd/src/master/src/dmd/mtype.d

Functions

NameDescription
attributesApply(tf, dg, trustFormat) For each active attribute (ref/const/nogc/etc) call fp with a void* for the work param and a string representation of the attribute.
isAggregate(t) If the type is a class or struct, returns the symbol for it, else null.
isCopyable(t) Determine if type t is copyable.
isIndexableNonAggregate(t) Determine if type t can be indexed or sliced given that it is not an aggregate with operator overloads.
modifiersApply(tf, dg) For each active modifier (MODFlags.const_, MODFlags.immutable_, etc) call fp with a void* for the work param and a string representation of the attribute.
MODimplicitConv(modfrom, modto) Return !=0 if modfrom can be implicitly converted to modto
MODmerge(mod1, mod2) Merge mod bits to form common mod.
MODmethodConv(modfrom, modto) Return MATCH.exact or MATCH.constant if a method of type '() modfrom' can call a method of type '() modto'.
MODtoBuffer(buf, mod) Store modifier name into buf.
MODtoChars(mod)
ModToStc(mod) Convert MODxxxx to STCxxx
MODtoString(mod)
toAutoQualChars(t1, t2) For printing two types with qualification when necessary.

Classes

NameDescription
Parameter
Type
TypeAArray
TypeArray
TypeBasic
TypeClass
TypeDArray Dynamic array, no dimension
TypeDelegate
TypeEnum
TypeError
TypeFunction
TypeIdentifier
TypeInstance Similar to TypeIdentifier, but with a TemplateInstance as the root
TypeMixin Implements mixin types.
TypeNext
TypeNull
TypePointer
TypeQualified
TypeReference
TypeReturn
TypeSArray Static array, one with a fixed dimension
TypeSlice This is so we can slice a TypeTuple
TypeStruct
TypeTraits This is a shell containing a TraitsExp that can be either resolved to a type or to a symbol.
TypeTuple
TypeTypeof
TypeVector The basetype must be one of: byte[16],ubyte[16],short[8],ushort[8],int[4],uint[4],long[2],ulong[2],float[4],double[2] For AVX: byte[32],ubyte[32],short[16],ushort[16],int[8],uint[8],long[4],ulong[4],float[8],double[4]

Structs

NameDescription
ParameterList Encapsulate Parameters* so .length and [i] can be used on it.

Enums

NameDescription
DotExpFlag dotExp() bit flags
VarArg Variadic argument lists

Authors

Walter Bright

License

Boost License 1.0