std::domain_error(3)

πŸ’– std::domain_error πŸ’–

okay bestie, welcome to the manual page for std::domain_error, straight out of the Library Functions Manual. she's a whole mood, she's a whole exception, and yes we're gonna read the entire thing together. no skimming. grab a boba. πŸ§‹βœ¨


🌸 NAME 🌸

std::domain_error β€” the exception that says "girl, that input is mathematically not it" πŸ’…


✨ SYNOPSIS ✨

#include <stdexcept_except.h>

so first thing: she inherits std::logic_error, which means she's part of the logic-error family tree. iconic lineage, no cap. πŸ‘‘

πŸŽ€ Public Member Functions πŸŽ€

  • domain_error (const char *) β€” constructor that takes a C-style string, bestie.
  • domain_error (const domain_error &)=default β€” copy constructor, defaulted, as the universe intended.
  • domain_error (const string &__arg) β€” constructor that takes a string argument.
  • domain_error (domain_error &&)=default β€” move constructor, also defaulted. she moves, she's booked and busy.
  • domain_error & operator= (const domain_error &)=default β€” copy assignment, defaulted.
  • domain_error & operator= (domain_error &&)=default β€” move assignment, defaulted.
  • virtual const char * what () const noexcept β€” the moment you've all been waiting for, she tells you what went wrong.

πŸ’œ DESCRIPTION πŸ’œ

okay so the whole vibe of this class is: it's thrown by the library, or by you, to report domain errors β€” and "domain" here is in the mathematical sense, iykyk. πŸ”₯

like, the domain of a function. the set of inputs that are actually valid. you passed something outside of that? that's a domain error, and this is the girl who announces it. πŸ’€


🌈 MEMBER FUNCTION DOCUMENTATION 🌈

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

returns a C-style character string describing the general cause of the current error β€” and it's the same string passed to the ctor, so whatever you told her at birth, that's what she says back. no embellishment. no drama. (okay a little drama, she's an exception.) 🫢

  • Reimplemented from std::exception.
  • Reimplemented in std::future_error.
  • References what().
  • Referenced by what().
she references herself and is referenced by herself. that's main character energy, fr fr. πŸ’…βœ¨

πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. so like, not a human author, a whole robot did this. slay, I guess. πŸ€–πŸ’–


and that's the page, bestie!! πŸ¦‹πŸŒΈ this came to you from libstdc++, the fine folks behind std::domain_error(3), and honestly? she ate. periodt. πŸ’œβœ¨πŸŽ€

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