isVoidValueEnabled

Template to determine if provided Hook enables void values for Expected

@safe
template isVoidValueEnabled (
Hook
) {
enum isVoidValueEnabled;
enum isVoidValueEnabled;
}

Examples

struct Hook { static immutable bool enableVoidValue = false; }
assert(!ok().hasError); // void values are enabled by default
static assert(!__traits(compiles, ok!(string, Hook)())); // won't compile

Meta