mir.conv

Conversion utilities.

Public Imports

core.lifetime
public import core.lifetime : emplace;

Members

Functions

emplaceInitializer
void emplaceInitializer(T chunk)

Emplace helper function.

emplaceRef
void emplaceRef(UT chunk, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
uninitializedFillDefault
T[] uninitializedFillDefault(T[] array)
xdestroy
void xdestroy(T[] ar)

Destroy structs and unions usnig __xdtor member if any. Do nothing for other types.

Templates

emplaceRef
template emplaceRef(T)
Undocumented in source.
to
template to(T)

The to template converts a value from one type to another. The source type is deduced and the target type must be specified, for example the expression to!int(42.0) converts the number 42 from double to int. The conversion is "unsafe", i.e., it does not check for overflow.

Meta

License

Apache-2.0

Authors

Ilya Yaroshenko