core.internal.dassert
Functions 1
fn
string _d_assert_fail(A)(const scope string op, auto ref const scope A a)Generates rich assert error messages for unary expressionsTemplates 2
tmpl_d_assert_fail(A...)
Generates rich assert error messages for binary expressions
The binary expression assert(x == y) will be turned into assert(x == y, _d_assert_fail!(typeof(x))("==", x, y)).
Parameters
comp | Comparison operator that was used in the expression. |
a | Left hand side operand (can be a tuple). |
b | Right hand side operand (can be a tuple). |
Returns
A string such as "$a $comp $b".
Functions
string _d_assert_fail(B...)(
const scope string comp, auto ref const scope A a, auto ref const scope B b) if (B.length != 0 || A.length != 1)
tmplgetPrintfFormat(T)
Yields the appropriate printf format token for a type T