std::bad_expected_access(3)
π NAME π
okay so welcome to the C++ Standard Libary page for std::bad_expected_access(3) β yes bestie, that manual-name spelling is canon, we keep it π
. The name line is literally:
std::bad_expected_access β std::bad_expected_access
β¨ Synopsis β¨
Defined in header <expected>
template< class E > (1)
(since C++23)
class bad_expected_access : public std::bad_expected_access<void>
template<> (2)
(since C++23)
class bad_expected_access<void> : public std::exception
Hereβs the tea, bestie:
(1)defines a type of object to be thrown bystd::expected::valuewhen accessing an expected object that contains an unexpected value.bad_expected_access<E>stores a copy of the unexpected value. π«Ά(2)bad_expected_access<void>is the base class of all otherbad_expected_accessspecializations. π
π§ This section is incomplete β Reason: inheritance diagram.
πΈ Parameters πΈ
(none) β literally no parameters, periodt π
π₯ Return value π₯
Pointer to a null-terminated string with explanatory information. The string is suitable for conversion and display as a std::wstring. 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.
π¦ Notes π¦
Implementations are allowed but not required to override what(). no cap.
π Members of the bad_expected_access<void> specialization
constructorβ constructs abad_expected_access<void>object (protected member function).destructorβ destroys thebad_expected_access<void>object (protected member function).operator=β replaces thebad_expected_access<void>object (protected member function).whatβ returns the explanatory string (public member function).
Special member functions of bad_expected_access<void> are protected. They can only be called by derived classes. π
π Example π
π This section is incomplete β Reason: no example.
π·οΈ Categories π·οΈ
- Todo with reason
- Todo no example
source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::bad_expected_access(3) β mwah, bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms