dmd.mtype

Defines a D type.

Members

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
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

DotExpFlag
enum DotExpFlag

dotExp() bit flags

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(const TypeFunction tf, void delegate(string) dg, TRUSTformat trustFormat = TRUSTformatDefault)

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(const 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(const 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.

Structs

ParameterList
struct ParameterList

Encapsulate Parameters* so .length and i can be used on it. https://dlang.org/spec/function.html#ParameterList

Meta