__gnu_cxx::recursive_init_error(3cxx)
π NAME
__gnu_cxx::recursive_init_error β the exception that __cxa_guard_acquire throws, bestie. That's it, that's the whole vibe.
β¨ SYNOPSIS β¨
Inherits std::exception. Yeah, it's part of the family. π«Ά
πΈ Public Member Functions
virtual const char * what () const noexceptβ the one (1) member function, and honestly she ate.
π¦ Detailed Description π¦
Okay so picture this: an exception thrown by __cxa_guard_acquire. That's the whole gig. Main character energy. π
Now for the lore, and bestie this part is serious β straight from C++ 2011 6.7 [stmt.dcl]/4:
If control re-enters the declaration recursively while the variable is being initialized, the behavior is undefined.
π undefined π like not "kinda weird" undefined, like actually undefined, so pay attention.
Since we already have a library function to handle locking, we might as well check for this situation and throw an exception. Lowkey genius. We use the second byte of the guard variable to remember that we're in the middle of an initialization. Memory trick, iykyk. β¨
Oh and for the record: Definition at line 704 of file cxxabi.h. She lives there. π
π Member Function Documentation π
π virtual const char* std::exception::what () const [virtual], [noexcept], [inherited]
Returns a C-style character string describing the general cause of the current error. That's literally what it does, no notes. π
Note the [inherited] β she's not original here, she got it from std::exception and she's slaying with it anyway.
Reimplemented in β buckle up, this is a long list and every single one of them is iconic in her own way:
std::bad_optional_accessstd::bad_typeidstd::bad_caststd::bad_exceptionstd::runtime_errorstd::logic_errorstd::future_errorstd::experimental::filesystem::v1::filesystem_errorstd::experimental::fundamentals_v1::bad_any_caststd::bad_function_callstd::bad_weak_ptrstd::filesystem::filesystem_errorstd::bad_any_caststd::bad_alloc- and
std::ios_base::failure
Not me listing fifteen exceptions π but every one of them said "I'll have what she's having."
π§ Author π§
Generated automatically by Doxygen for libstdc++ from the source code. No human wrote this, a robot did, and honestly? It understood the assignment.
okay that's the whole page, go forth and don't recursively re-enter your variable declarations ππ¦β¨
libstdc++ Β· Sat Mar 19 β that's the version and date right there, mwah, bye bestie ππ
π¦ where this page comes from
- ubuntu jammy: libstdc++-12-doc 12-20220319-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms