lu.traits

Various compile-time traits and cleverness.

Members

Enums

MixinScope
enum MixinScope

The types of scope into which a mixin template may be mixed in.

isMerelyArray
eponymoustemplate isMerelyArray(S)

True if a type is a non-string array; otherwise false.

isMutableArrayOfImmutables
eponymoustemplate isMutableArrayOfImmutables(Array : Element[], Element)

Evaluates whether or not a passed array type is a mutable array of immutable elements, such as a string.

isStruct
eponymoustemplate isStruct(T)

Eponymous template that is true if the passed type is a struct.

isTrulyString
eponymoustemplate isTrulyString(S)

True if a type is string, dstring or wstring; otherwise false.

stringOfTypeOf
eponymoustemplate stringOfTypeOf(T)

The string representation of a type. Non-alias parameter overload.

stringOfTypeOf
eponymoustemplate stringOfTypeOf(alias T)

The string representation of the type of something. Alias parameter overload.

udaIndexOf
eponymoustemplate udaIndexOf(alias symbol, T)

Returns the index of a given UDA, as annotated on a symbol.

Imports

getSymbolsByUDA (from std.traits)
public import std.traits : getSymbolsByUDA;

Phobos' getSymbolsByUDA publicly imported in versions other than 2.088 and 2.089.

Mixins

__anonymous
mixin TestMixinConstrainedToModule
Undocumented in source.

Mixin templates

MixinConstraints
mixintemplate MixinConstraints(MixinScope mixinScope, string mixinName = "a constrained mixin")

Mixes in constraints into another mixin template, to provide static guarantees that it is not mixed into a type of scope other than the one specified.

TestMixinConstrainedToClass
mixintemplate TestMixinConstrainedToClass()
Undocumented in source.
TestMixinConstrainedToClassOrStruct
mixintemplate TestMixinConstrainedToClassOrStruct()
Undocumented in source.
TestMixinConstrainedToFunctions
mixintemplate TestMixinConstrainedToFunctions()
Undocumented in source.
TestMixinConstrainedToModule
mixintemplate TestMixinConstrainedToModule()
Undocumented in source.
TestMixinConstrainedToStruct
mixintemplate TestMixinConstrainedToStruct()
Undocumented in source.

Templates

CategoryName
template CategoryName(alias sym)

Provides string representations of the category of a symbol, where such is not a fundamental primitive variable but a module, a function, a delegate, a class or a struct.

TakesParams
template TakesParams(alias fun, P...)

Given a function and a tuple of types, evaluates whether that function could be called with that tuple as parameters. Alias version (works on functions, not function types.)

TakesParams
template TakesParams(Fun, P...)

Given a function and a tuple of types, evaluates whether that function could be called with that tuple as parameters. Non-alias version (works on types).

UnqualArray
template UnqualArray(QualArray : QualType[], QualType)

Given an array of qualified elements, aliases itself to one such of unqualified elements.

UnqualArray
template UnqualArray(QualArray : QualElem[QualKey], QualElem, QualKey)

Given an associative array with elements that have a storage class, aliases itself to an associative array with elements without the storage classes.

UnqualArray
template UnqualArray(QualArray : QualElem[QualKey], QualElem, QualKey)

Given an associative array of arrays with a storage class, aliases itself to an associative array with array elements without the storage classes.

getSymbolsByUDA
template getSymbolsByUDA(alias symbol, alias attribute)

Provide a non-2.088, non-2.089 getSymbolsByUDA.

isSerialisable
template isSerialisable(alias sym)

Eponymous template bool of whether a variable can be treated as a mutable variable, like a fundamental integral, and thus be serialised.

stringofParams
template stringofParams(alias fun)

Produces a string of the unqualified parameters of the passed function alias.

Mixed In Members

From mixin TestMixinConstrainedToModule

__anonymous
mixin MixinConstraints!((MixinScope.module_), "TestMixinConstrainedToModule")
Undocumented in source.

Meta