Policies

No-value policies

In the previous section we have seen that it would be useful if calling member function .value() on object of type outcome<T> that did not contain a value, would cause an exception to be thrown according to some user-defined policy. Let us consider result<T> first. It is an alias to basic_result<T, E, NoValuePolicy> , where E is the type storing error information and defaulted to std::error_code/boost::system::error_code, and NoValuePolicy is a no-value policy defaulted to default_policy<T, EC, EP> . »