std::bad_optional_access(3cxx)
hey bestie, welcome to the std::bad_optional_access(3cxx) manual page. let's get into it π
π NAME π
std::bad_optional_access β Exception class thrown when a disengaged optional object is dereferenced. that's the name, that's the whole plot π
β¨ SYNOPSIS β¨
okay so to even get this class in your life, you include:
#include <optional>
and the inheritance situation is:
Inherits std::exception.
periodt.
π Public Member Functions π
const char * what () const noexcept overrideβ this is the public member function, and it's giving main character energy.
πΈ DETAILED DESCRIPTION πΈ
Exception class thrown when a disengaged optional object is dereferenced. lowkey that's the whole detailed description. it's the "you dereferenced an optional that isn't engaged" exception. no cap.
π MEMBER FUNCTION DOCUMENTATION π
here's the signature, copied exactly, bestie:
const char * std::bad_optional_access::what () const [inline], [override],
[virtual], [noexcept]
Returns a C-style character string describing the general cause of the current error.
Reimplemented from std::exception.
π AUTHOR π
Generated automatically by Doxygen for libstdc++ from the source code.
bestie, this page came from the libstdc++ manual, page std::bad_optional_access(3cxx). The footer doesn't give a date, just libstdc++ and std::bad_optional_access(3cxx), so that's the whole sign-off. periodt π
π¦ where this page comes from
- ubuntu resolute: libstdc++-11-doc 11.5.0-11ubuntu2
- ubuntu resolute: libstdc++-12-doc 12.5.0-9ubuntu1
- ubuntu resolute: libstdc++-13-doc 13.4.0-10ubuntu1
- ubuntu stonking: libstdc++-11-doc 11.5.0-11ubuntu2
- ubuntu stonking: libstdc++-12-doc 12.5.0-9ubuntu1
- ubuntu stonking: libstdc++-13-doc 13.5.0-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms