Value function has nothing to be with monad_error. It is much more related to PossiblyValued concept as deref is.
The single issue is which exception to throw. For the time been the exception thrown is bad_access. bad_expected_access inherits from bad_access. bad_optional_access should inherit from bad_access also.
Value function has nothing to be with monad_error. It is much more related to PossiblyValued concept as deref is.
The single issue is which exception to throw. For the time been the exception thrown is bad_access. bad_expected_access inherits from bad_access. bad_optional_access should inherit from bad_access also.