std::bad_cast(3cxx)
okay bestie, welcome to std::bad_cast from the <purple>3cxx</purple> manual β sheβs the exception you meet when a typecast goes wrong, and she has main character energy π
β¨
π NAME π
std::bad_cast β thrown during incorrect typecasting. Thatβs the whole vibe: bad cast, bad time, exception said βnot todayβ π
π¦ SYNOPSIS π¦
#include <typeinfo>
- Inherits
std::exception. - Inherited by
std::experimental::fundamentals_v1::bad_any_cast.
β¨ Public Member Functions β¨
virtual const char * what () const noexceptβ the public member function signature, exactly as listed, bestie.
πΈ Detailed Description πΈ
Okay so thrown during incorrect typecasting β yes, again, because thatβs literally her job π
If you attempt an invalid dynamic_cast expression, an instance of this class (or something derived from this class) is thrown. So like, if the cast is not casting correctly, boom: thatβs the throw, no cap π
π Member Function Documentation π
virtual const char * std::bad_cast::what () const [virtual], [noexcept]
This one returns a C-style character string describing the general cause of the current error. Thatβs the whole assignment: what() gives you the general cause, bestie.
- Reimplemented from
std::exception. - Reimplemented in
std::experimental::fundamentals_v1::bad_any_cast.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. So nobody hand-wrote this baddie; Doxygen did the thing β¨
thatβs the page, bestie! Shoutout to libstdc++ for the source/version and to std::bad_cast(3cxx) for the manual page name β the original footer has no date, so Iβm not inventing one ππ
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms