hasOnErrorSet

Template to determine if hook provides function called when error is set.

Members

Manifest constants

hasOnErrorSet
enum hasOnErrorSet;
Undocumented in source.
hasOnErrorSet
enum hasOnErrorSet;
Undocumented in source.

Examples

struct Hook {
    static string lastErr;
    static void onErrorSet(E)(auto ref E err) { lastErr = err; }
}

static assert(hasOnErrorSet!(Hook, string));
auto res = err!(int, Hook)("foo");
assert(res.hasError);
assert(Hook.lastErr == "foo");

Meta