tanya.meta.transform

Type transformations.

Templates in this module can be used to modify type qualifiers or transform types. They take some type as argument and return a different type after perfoming the specified transformation.

Members

Aliases

ConstOf
alias ConstOf(T) = const(T)

Adds $(D_KEYWORD inout) qualifier to the type T.

ImmutableOf
alias ImmutableOf(T) = immutable(T)

Adds $(D_KEYWORD immutable) qualifier to the type T.

InoutConstOf
alias InoutConstOf(T) = inout(const T)

Adds $(D_KEYWORD inout const) qualifier to the type T.

InoutOf
alias InoutOf(T) = inout(T)

Adds $(D_KEYWORD inout) qualifier to the type T.

SharedConstOf
alias SharedConstOf(T) = shared(const T)

Adds $(D_KEYWORD shared const) qualifier to the type T.

SharedInoutConstOf
alias SharedInoutConstOf(T) = shared(inout const T)

Adds $(D_KEYWORD shared inout const) qualifier to the type T.

SharedInoutOf
alias SharedInoutOf(T) = shared(inout T)

Adds $(D_KEYWORD inout) qualifier to the type T.

SharedOf
alias SharedOf(T) = shared(T)

Adds $(D_KEYWORD inout) qualifier to the type T.

TypeOf
alias TypeOf(T) = T

Determines the type of T. If T is already a type, $(D_PSYMBOL TypeOf) aliases itself to T.

Templates

CopyConstness
template CopyConstness(From, To)

Copies constness of From to To.

KeyType
template KeyType(T)
Largest
template Largest(Args...)

Finds the type with the largest size in the Args list. If several types have the same type, the leftmost is returned.

OriginalType
template OriginalType(T)

If T is an $(D_KEYWORD enum), OriginalType!T evaluates to the most base type of that $(D_KEYWORD enum) and to T otherwise.

PointerTarget
template PointerTarget(T)

Retrieves the target type U of a pointer U*.

Smallest
template Smallest(Args...)

Finds the type with the smallest size in the Args list. If several types have the same type, the leftmost is returned.

TypeOf
template TypeOf(alias T)

Determines the type of T. If T is already a type, $(D_PSYMBOL TypeOf) aliases itself to T.

Unqual
template Unqual(T)

Removes any type qualifiers from T.

ValueType
template ValueType(T)

Meta