dmd.staticcond

Lazily evaluate static conditions for static if, static assert and template constraints.

Members

Functions

evalStaticCondition
bool evalStaticCondition(Scope* sc, Expression original, Expression e, out bool errors, Expressions* negatives = null)

Semantically analyze and then evaluate a static condition at compile time. This is special because short circuit operators &&, || and ?: at the top level are not semantically analyzed if the result of the expression is not necessary.

visualizeStaticCondition
const(char)* visualizeStaticCondition(Expression original, Expression instantiated, const Expression[] negatives, bool full, ref uint itemCount)

Format a static condition as a tree-like structure, marking failed and bypassed expressions.

Meta