std::bad_weak_ptr(3cxx)

πŸ¦‹ std::bad_weak_ptr β€” like, the NAME section, bestie πŸ¦‹

okay so <pink>std::bad_weak_ptr</pink> is an exception that shared_ptr might possibly throw. that's the whole vibe. iykyk. πŸ’…

this one lives in manual section 3cxx (the libstdc++ corner of the universe, we love her). πŸŽ€


✨ SYNOPSIS ✨

you gotta pull her in first, no cap:

#include <memory>

Inherits: std::exception β€” she's part of the family tree, main character energy fr. πŸ‘‘

🌸 Public Member Functions 🌸

  • virtual char const * what () const noexcept β€” yeah that's the one, the little describing-herself function, more on her below 🫢

πŸ’– Detailed Description πŸ’–

literally just this: an exception possibly thrown by shared_ptr. that's it, that's the whole description bestie, she's a mystery but an iconic one πŸ•΅οΈβ€β™€οΈβœ¨


🌈 Member Function Documentation 🌈

⭐ virtual char const * std::bad_weak_ptr::what () const [virtual], [noexcept]

so this is the function, right, and here's what she does:

returns a C-style character string that describes the general cause of the current error. classic. very demure. very mindful. πŸŽ€

  • Reimplemented from std::exception β€” she's over here doing her own version of a thing her parent class already had, slay honestly πŸ’…
ngl the [virtual] and [noexcept] bits aren't decoration β€” they're literally part of the signature, so don't come for me, copy it exactly fr fr 🫢

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. β€” so like, a robot wrote this, not a human, and honestly the robot ate πŸ€–βœ¨


and that's the page!! πŸ’– this lil beauty is from libstdc++, dated std::bad_weak_ptr(3cxx) in the footer, and yes the header at the very top says std::bad_weak_ptr(3cxx) too β€” we stayed consistent, we stayed cute, periodt. πŸ¦‹πŸŒΈπŸŽ€

πŸ“¦ where this page comes from