std::bad_typeid(3)

πŸ’– std::bad_typeid πŸ’–

okay bestie, welcome to the std::bad_typeid page from the Library Functions Manual β€” yes that's the man page section 3 situation, we're in library-functions territory, pull up a chair 🫢


✨ NAME ✨

std::bad_typeid β€” the exception that gets thrown when a NULL pointer in a typeid expression is used. that's it, that's the whole job, and it does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

#include <typeinfo>

Inherits std::exception. so like, it's part of the family, it's got the whole std::exception bloodline going on πŸ‘‘

πŸŽ€ Public Member Functions πŸŽ€

  • virtual constexpr const char * what () const noexcept

πŸ¦‹ Detailed Description πŸ¦‹

Thrown when a NULL pointer in a typeid expression is used.

literally that's the entire vibe. you dereference-ish a NULL pointer inside typeid, and the standard library said "not today" and handed you one of these instead 😭✨


πŸ’œ Member Function Documentation πŸ’œ

virtual constexpr const char * std::bad_typeid::what () const [inline], [constexpr], [virtual], [noexcept]

Returns a C-style character string describing the general cause of the current error.

Reimplemented from std::exception. so it's doing the classic what() thing but its own way, main character energy fr fr πŸ”₯

no cap: every single qualifier on that signature matters β€” inline, constexpr, virtual, noexcept, all of them. copy it exactly if you're writing it down, bestie πŸŽ€

🌈 Author 🌈

Generated automatically by Doxygen for libstdc++ from the source code.


okay so that's the whole page, we ate and left no crumbs πŸ“ the source/version at the bottom is libstdc++, and the page itself is std::bad_typeid(3) β€” go forth and catch your exceptions, bestie πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms