dmd.mtype

Defines a D type.

Members

Aliases

MOD
alias MOD = ubyte
Undocumented in source.
TMAX
alias TMAX = ENUMTY.TMAX
Undocumented in source.
TRUSTformatDefault
alias TRUSTformatDefault = TRUSTformat.TRUSTformatDefault
Undocumented in source.
TRUSTformatSystem
alias TRUSTformatSystem = TRUSTformat.TRUSTformatSystem
Undocumented in source.
TY
alias TY = ubyte
Undocumented in source.
Taarray
alias Taarray = ENUMTY.Taarray
Undocumented in source.
Tarray
alias Tarray = ENUMTY.Tarray
Undocumented in source.
Tbool
alias Tbool = ENUMTY.Tbool
Undocumented in source.
Tchar
alias Tchar = ENUMTY.Tchar
Undocumented in source.
Tclass
alias Tclass = ENUMTY.Tclass
Undocumented in source.
Tcomplex32
alias Tcomplex32 = ENUMTY.Tcomplex32
Undocumented in source.
Tcomplex64
alias Tcomplex64 = ENUMTY.Tcomplex64
Undocumented in source.
Tcomplex80
alias Tcomplex80 = ENUMTY.Tcomplex80
Undocumented in source.
Tdchar
alias Tdchar = ENUMTY.Tdchar
Undocumented in source.
Tdelegate
alias Tdelegate = ENUMTY.Tdelegate
Undocumented in source.
Tenum
alias Tenum = ENUMTY.Tenum
Undocumented in source.
Terror
alias Terror = ENUMTY.Terror
Undocumented in source.
Tfloat32
alias Tfloat32 = ENUMTY.Tfloat32
Undocumented in source.
Tfloat64
alias Tfloat64 = ENUMTY.Tfloat64
Undocumented in source.
Tfloat80
alias Tfloat80 = ENUMTY.Tfloat80
Undocumented in source.
Tfunction
alias Tfunction = ENUMTY.Tfunction
Undocumented in source.
Tident
alias Tident = ENUMTY.Tident
Undocumented in source.
Timaginary32
alias Timaginary32 = ENUMTY.Timaginary32
Undocumented in source.
Timaginary64
alias Timaginary64 = ENUMTY.Timaginary64
Undocumented in source.
Timaginary80
alias Timaginary80 = ENUMTY.Timaginary80
Undocumented in source.
Tinstance
alias Tinstance = ENUMTY.Tinstance
Undocumented in source.
Tint128
alias Tint128 = ENUMTY.Tint128
Undocumented in source.
Tint16
alias Tint16 = ENUMTY.Tint16
Undocumented in source.
Tint32
alias Tint32 = ENUMTY.Tint32
Undocumented in source.
Tint64
alias Tint64 = ENUMTY.Tint64
Undocumented in source.
Tint8
alias Tint8 = ENUMTY.Tint8
Undocumented in source.
Tmixin
alias Tmixin = ENUMTY.Tmixin
Undocumented in source.
Tnone
alias Tnone = ENUMTY.Tnone
Undocumented in source.
Tnoreturn
alias Tnoreturn = ENUMTY.Tnoreturn
Undocumented in source.
Tnull
alias Tnull = ENUMTY.Tnull
Undocumented in source.
Tpointer
alias Tpointer = ENUMTY.Tpointer
Undocumented in source.
Treference
alias Treference = ENUMTY.Treference
Undocumented in source.
Treturn
alias Treturn = ENUMTY.Treturn
Undocumented in source.
Tsarray
alias Tsarray = ENUMTY.Tsarray
Undocumented in source.
Tslice
alias Tslice = ENUMTY.Tslice
Undocumented in source.
Tstruct
alias Tstruct = ENUMTY.Tstruct
Undocumented in source.
Ttraits
alias Ttraits = ENUMTY.Ttraits
Undocumented in source.
Ttuple
alias Ttuple = ENUMTY.Ttuple
Undocumented in source.
Ttypeof
alias Ttypeof = ENUMTY.Ttypeof
Undocumented in source.
Tuns128
alias Tuns128 = ENUMTY.Tuns128
Undocumented in source.
Tuns16
alias Tuns16 = ENUMTY.Tuns16
Undocumented in source.
Tuns32
alias Tuns32 = ENUMTY.Tuns32
Undocumented in source.
Tuns64
alias Tuns64 = ENUMTY.Tuns64
Undocumented in source.
Tuns8
alias Tuns8 = ENUMTY.Tuns8
Undocumented in source.
Tvector
alias Tvector = ENUMTY.Tvector
Undocumented in source.
Tvoid
alias Tvoid = ENUMTY.Tvoid
Undocumented in source.
Twchar
alias Twchar = ENUMTY.Twchar
Undocumented in source.

Classes

Parameter
class Parameter
Type
class Type
TypeAArray
class TypeAArray
TypeArray
class TypeArray
TypeBasic
class TypeBasic
TypeClass
class TypeClass
TypeDArray
class TypeDArray

Dynamic array, no dimension

TypeDelegate
class TypeDelegate
TypeEnum
class TypeEnum
TypeError
class TypeError
TypeFunction
class TypeFunction
TypeIdentifier
class TypeIdentifier
TypeInstance
class TypeInstance

Similar to TypeIdentifier, but with a TemplateInstance as the root

TypeMixin
class TypeMixin

Implements mixin types.

TypeNext
class TypeNext
TypeNoreturn
class TypeNoreturn
TypeNull
class TypeNull
TypePointer
class TypePointer
TypeQualified
class TypeQualified
TypeReference
class TypeReference
TypeReturn
class TypeReturn
TypeSArray
class TypeSArray

Static array, one with a fixed dimension

TypeSlice
class TypeSlice

This is so we can slice a TypeTuple

TypeStruct
class TypeStruct
TypeTraits
class TypeTraits

This is a shell containing a TraitsExp that can be either resolved to a type or to a symbol.

TypeTuple
class TypeTuple
TypeTypeof
class TypeTypeof
TypeVector
class 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]

Enums

AliasThisRec
enum AliasThisRec
Undocumented in source.
DotExpFlag
enum DotExpFlag

dotExp() bit flags

ENUMTY
enum ENUMTY
Undocumented in source.
MODFlags
enum MODFlags
Undocumented in source.
PURE
enum PURE
Undocumented in source.
RET
enum RET
Undocumented in source.
TRUST
enum TRUST
Undocumented in source.
TRUSTformat
enum TRUSTformat
Undocumented in source.
VarArg
enum VarArg

Variadic argument lists https://dlang.org/spec/function.html#variadic

Functions

MODimplicitConv
bool MODimplicitConv(MOD modfrom, MOD modto)

Return !=0 if modfrom can be implicitly converted to modto

MODmerge
MOD MODmerge(MOD mod1, MOD mod2)

Merge mod bits to form common mod.

MODmethodConv
MATCH MODmethodConv(MOD modfrom, MOD modto)

Return MATCH.exact or MATCH.constant if a method of type '() modfrom' can call a method of type '() modto'.

MODtoBuffer
void MODtoBuffer(OutBuffer* buf, MOD mod)

Store modifier name into buf.

MODtoChars
const(char)* MODtoChars(MOD mod)
MODtoString
string MODtoString(MOD mod)
ModToStc
StorageClass ModToStc(uint mod)

Convert MODxxxx to STCxxx

attributesApply
void attributesApply(TypeFunction tf, void delegate(string) dg, TRUSTformat 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
AggregateDeclaration isAggregate(Type t)

If the type is a class or struct, returns the symbol for it, else null.

isCopyable
bool isCopyable(Type t)

Determine if type t is copyable.

isIndexableNonAggregate
bool isIndexableNonAggregate(Type t)

Determine if type t can be indexed or sliced given that it is not an aggregate with operator overloads.

isSomeChar
bool isSomeChar(TY ty)

Returns true if ty is char, wchar, or dchar

modifiersApply
void modifiersApply(TypeFunction tf, void delegate(string) 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.

toAutoQualChars
const(char*)[2] toAutoQualChars(Type t1, Type t2)

For printing two types with qualification when necessary.

Manifest constants

LOGDEFAULTINIT
enum LOGDEFAULTINIT;
Undocumented in source.
LOGDOTEXP
enum LOGDOTEXP;
Undocumented in source.
SIZE_INVALID
enum SIZE_INVALID;
Undocumented in source.

Structs

ParameterList
struct ParameterList

Represents a function's formal parameters + variadics info. Length, indexing and iteration are based on a depth-first tuple expansion. https://dlang.org/spec/function.html#ParameterList

Meta