_d_assert_fail
fn
string _d_assert_fail(A)(const scope string op, auto ref const scope A a)Generates rich assert error messages for unary expressions
The unary expression assert(!una) will be turned into assert(!una, _d_assert_fail("!", una)). This routine simply acts as if the user wrote assert(una == false).
Parameters
op | Operator that was used in the expression, currently only "!" is supported. |
a | Result of the expression that was used in assert before its implicit conversion to bool. |
Returns
A string such as "$a != true" or "$a == true".