mir.utility

Generic utilities.

Cheat Sheet
Function NameDescription
swapSwaps two values.
extMulExtended unsigned multiplications.
minMinimum value.
maxMaximum value.

Public Imports

ldc.intrinsics
public import ldc.intrinsics : _expect = llvm_expect;
std.algorithm.mutation
public import std.algorithm.mutation : swap;

Members

Functions

_expect
T _expect(T val, T expected_val)
_expect
T _expect(T val, T expected_val)
extMul
ExtMulResult!U extMul(U a, U b)

Extended unsigned multiplications. Performs U x U multiplication and returns ExtMulResult!U that contains extended result.

inlineIR
R inlineIR(P )
Undocumented in source.
max
auto max(T args)

Iterates the passed arguments and returns the minimum value.

min
auto min(T args)

Iterates the passed arguments and returns the minimum value.

swapStars
void swapStars(I1 i1, I2 i2)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

ExtMulResult
struct ExtMulResult(I)

Return type for extMul;

Templates

simpleSort
template simpleSort(alias cmp = "a < b")

Simple sort algorithm usefull for CTFE code.

Meta

License

Apache-2.0

Authors

Ilya Yaroshenko, Andrei Alexandrescu (original std.* modules),