A type
T is a
valid value type for expected,
if
remove_cv_t<T> is
void
or a complete non-array object type that is not
in_place_t,
unexpect_t,
or a specialization of
unexpected. A program which instantiates class template
expected<T, E>
with an argument
T that is not a valid value
type for
expected is ill-formed
. A program that instantiates
the definition of the template
expected<T, E>
with a type for the
E parameter
that is not a valid template argument for
unexpected is ill-formed
.