unstd.traits

Additions to $(STDMODULE _traits).

Public Imports

std.traits
public import std.traits;

Members

Aliases

ArrayElementType
alias ArrayElementType(T : T[]) = T

Returns the element type of an array.

Enums

isPackedTuple
eponymoustemplate isPackedTuple(alias A)
eponymoustemplate isPackedTuple(A)

Detect whether tuple A is PackedGenericTuple.

isType
eponymoustemplate isType(T)
eponymoustemplate isType(alias T)

true iff T is a type. Usable for analysing generic tuples.

Templates

ExtractTypes
template ExtractTypes(T, Extracted...)

Get all types T include except Extracted without duplicates in such order that every compound type precedes types it includes.

MultidimStaticArrayElementType
template MultidimStaticArrayElementType(T, size_t n = staticArrayDims!T)

Gets the element type of the innermost array in a multidimensional static array type. Considers T to be an n-dimensional static array type.

multidimStaticArrayElementCount
template multidimStaticArrayElementCount(T, size_t n = staticArrayDims!T)

Calculates the total element count of a multidimensional static array. Considers T to be an n-dimensional static array type.

multidimStaticArrayLengths
template multidimStaticArrayLengths(T, size_t n = staticArrayDims!T)

Get, as an expression tuple, multidimensional static array lengths considering T to be n-dimensioanl static array.

staticArrayDims
template staticArrayDims(T)

Gets the rank (number of dimensions) of a static array type.

Meta

Authors

Denis Shelomovskij