Handler for case when empty error is accessed.
Handler for case when empty value is accessed.
1 static assert(!isDefaultConstructorEnabled!Throw); 2 static assert(hasOnAccessEmptyValue!(Throw, string)); 3 static assert(hasOnAccessEmptyValue!(Throw, int)); 4 static assert(hasOnAccessEmptyError!Throw); 5 6 assertThrown!(Unexpected!string)(ok!(string, Throw)(42).error); 7 assertThrown!(Unexpected!string)(err!(int, Throw)("foo").value); 8 assertThrown!(Unexpected!int)(err!(bool, Throw)(-1).value);
Hook implementation that throws exceptions instead of default assert behavior.