std::bad_alloc(3cxx)
π NAME π
std::bad_alloc β the exception that might get thrown by new, bestie. This is the 3cxx manual page for it, and yes, she's a whole vibe. π«Ά
β¨ SYNOPSIS β¨
#include <new>
She inherits std::exception. π
She is inherited by std::bad_array_new_length. Family tree slay. π
π Public Member Functions π
bad_alloc (const bad_alloc &)=defaultβ copy constructor, defaulted, iconic.bad_alloc & operator= (const bad_alloc &)=defaultβ copy assignment, defaulted, also iconic.virtual const char * what () const throw ()β virtual, and it tells you what's up. π₯
πΈ Detailed Description πΈ
So, exception possibly thrown by new. That's the whole mood. π
bad_alloc (or classes derived from it) is used to report allocation errors from the throwing forms of new. Lowkey serious business. π
π¦ Member Function Documentation π¦
β virtual const char * std::bad_alloc::what () const [virtual] β
Returns a C-style character string describing the general cause of the current error. That's it, that's the function. β¨
Reimplemented from std::exception. Periodt. π
π§ Author π§
Generated automatically by Doxygen for libstdc++ from the source code. No cap, the robots wrote this one. π€π
Okay bestie, cute lil sign-off: this page is from the libstdc++ manual, and the footer says libstdc++ and std::bad_alloc(3cxx) β no date on this one, so don't come for me. π«Άπβ
π¦ 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