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

Aliases

NameTypeDescription
CommonType void Determines the type all Args can be implicitly converted to.
ConstOf const(T) Adds inout qualifier to the type T.
CopyConstness To Copies constness of From to To.
CopyTypeQualifiers To Copies type qualifiers of From to To.
ImmutableOf immutable(T) Adds immutable qualifier to the type T.
InoutConstOf const(inout(T)) Adds inout const qualifier to the type T.
InoutOf inout(T) Adds inout qualifier to the type T.
KeyType K
Largest Args[0] Finds the type with the largest size in the Args list. If several types have the same type, the leftmost is returned.
OriginalType OriginalType!U If T is an enum, OriginalType!T evaluates to the most base type of that enum and to T otherwise.
PointerTarget U Retrieves the target type U of a pointer U*.
CopyTypeQualifiers!(T,typeof(T.init+T.init))
QualifierOf ConstOf Returns a template with one argument which applies all qualifiers of T on its argument if instantiated.
SharedConstOf const(shared(T)) Adds shared const qualifier to the type T.
SharedInoutConstOf const(inout(shared(T))) Adds shared inout const qualifier to the type T.
SharedInoutOf inout(shared(T)) Adds inout qualifier to the type T.
SharedOf shared(T) Adds inout qualifier to the type T.
Signed CopyTypeQualifiers!(T,byte) Evaluates to the signed counterpart of the integral type T preserving all type qualifiers. If T is already signed, Signed!T aliases T.
Smallest Args[0] Finds the type with the smallest size in the Args list. If several types have the same type, the leftmost is returned.
TypeOf T Determines the type of T. If T is already a type, TypeOf aliases itself to T.
Unqual U Removes any type qualifiers from T.
Unsigned CopyTypeQualifiers!(T,ubyte) Evaluates to the unsigned counterpart of the integral type T preserving all type qualifiers. If T is already unsigned, Unsigned!T aliases T.
ValueType V