std::underflow_error(3)

πŸ’– std::underflow_error πŸ’–

okay bestie, welcome to the manual page for std::underflow_error β€” she's a Library Functions Manual girlie, page 3, and she is so underrated. pull up a chair, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

std::underflow_error β€” the exception that shows up when your arithmetic goes too low. yes babe, numbers have a basement and sometimes you fall through the floor πŸ•³οΈ


🌸 SYNOPSIS 🌸

#include <stdexcept_except.h>

she Inherits std::runtime_error. so like… she's part of the runtime_error family, it's giving nepo baby but make it exception hierarchy πŸ’…


πŸŽ€ Public Member Functions πŸŽ€

here's the whole squad, no gatekeeping:

  • underflow_error (const char *) β€” build one from a C-style string, classic.
  • underflow_error (const string &__arg) β€” build one from a std::string instead, fancy.
  • underflow_error (const underflow_error &)=default β€” copy constructor, defaulted, she can clone herself.
  • underflow_error (underflow_error &&)=default β€” move constructor, defaulted, she can zoom.
  • underflow_error & operator= (const underflow_error &)=default β€” copy assignment, defaulted.
  • underflow_error & operator= (underflow_error &&)=default β€” move assignment, defaulted.
  • virtual const char * what () const noexcept β€” the iconic one. returns the message. never throws. periodt.

πŸ¦‹ Detailed Description πŸ¦‹

Thrown to indicate arithmetic underflow.

that's the whole vibe. if a computation underflows, this is the girl who gets thrown. πŸ”₯


πŸ’œ Member Function Documentation πŸ’œ

virtual const char * std::runtime_error::what () const [virtual], [noexcept], [inherited]

okay so this one is inherited, meaning she got it from std::runtime_error, and it's marked [virtual] and [noexcept] β€” so she's flexible and she will never, ever throw at you. icon behaviour.

what she does: returns a C-style character string describing the general cause of the current error β€” literally the same string that got passed to the ctor. so whatever you told her when you made her, that's what she says back. no plot twists.

  • 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().

(yes she references herself and gets referenced by herself. main character energy, honestly. she's in a lil recursive situationship with her own documentation. πŸ™ˆ)


⭐ Author ⭐

Generated automatically by Doxygen for libstdc++ from the source code. so technically nobody wrote her, she just kinda materialized. a queen who was born, not made. πŸ‘‘


and that's the page, bestie!! 🫢 go forth and catch your underflows responsibly, and remember: if your number goes below where it should, std::underflow_error is right there waiting. slay πŸ’–

libstdc++ Β· std::underflow_error(3) β€” mwah, catch you on the next manpage πŸŒˆβœ¨πŸŽ€

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