cpp/utility/expected/bad expected access

@1@ Defines a type of object to be thrown by when accessing an expected object that contains an unexpected value. stores a copy of the unexpected value.

@2@ is the base class of all other  specializations.

Members of the primary template
{{member | {{small|std::bad_expected_access::}}what | {{dcl begin}} {{dcl | const char* what const noexcept override; }} {{dcl end}}

Returns the explanatory string.

Parameters
(none)

Return value
Pointer to a null-terminated string with explanatory information. The string is suitable for conversion and display as a std. The pointer is guaranteed to be valid at least until the exception object from which it is obtained is destroyed, or until a non-const member function (e.g. copy assignment operator) on the exception object is called.

Members of the specialization
Special member functions of are protected. They can only be called by derived classes.