hasOnValueSet

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

Members

Manifest constants

hasOnValueSet
enum hasOnValueSet;
Undocumented in source.
hasOnValueSet
enum hasOnValueSet;
Undocumented in source.

Examples

struct Hook {
    static int lastValue;
    static void onValueSet(T)(auto ref T val) { lastValue = val; }
}

static assert(hasOnValueSet!(Hook, int));
auto res = ok!(string, Hook)(42);
assert(res.hasValue);
assert(Hook.lastValue == 42);

Meta