std::overflow_error(3)

πŸ’– std::overflow_error(3) πŸ’–

okay bestie, so this is a page from the Library Functions Manual for std::overflow_error β€” it's a C++ thing, from libstdc++, and we're in section 3 (library functions, the fun section). pull up a chair 🫢


✨ NAME ✨

std::overflow_error β€” the exception you throw when the math just gets too big for its own good πŸ’€


🌈 SYNOPSIS 🌈

#include <stdexcept_except.h>

Inherits std::runtime_error.

πŸŽ€ Public Member Functions πŸŽ€

  • overflow_error (const char *)
  • overflow_error (const overflow_error &)=default
  • overflow_error (const string &__arg)
  • overflow_error (overflow_error &&)=default
  • overflow_error & operator= (const overflow_error &)=default
  • overflow_error & operator= (overflow_error &&)=default
  • virtual const char * what () const noexcept

πŸ’… Detailed Description πŸ’…

Thrown to indicate arithmetic overflow.

like. the number got SO big. it simply could not. and instead of pretending everything's fine, we throw. periodt ✨


🌸 Member Function Documentation 🌸

πŸ¦‹ virtual const char * std::runtime_error::what () const [virtual], [noexcept], [inherited] πŸ¦‹

Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor).

  • Reimplemented from std::exception.
  • Reimplemented in std::experimental::filesystem::v1::filesystem_error, std::filesystem::filesystem_error, and std::ios_base::failure.
  • References what().
  • Referenced by what().
no cap, yes, it literally references itself and is referenced by itself. it's giving main character energy, it's giving recursion, we love that for it πŸ’–

πŸ‘‘ Author πŸ‘‘

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

like, no human wrote this, the machine did it all by itself, and honestly? ate. πŸ€–βœ¨


okay that's the whole page bestie, you're so welcome πŸ’œ

and a lil sign-off as promised: this iconic little number lives in libstdc++, it's std::overflow_error(3) (yes, section 3, the cool one), and that's the whole vibe. go forth and catch your overflows πŸ§šπŸŒΈπŸ’–

πŸ“¦ 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
  • 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