std::out_of_range(3)
π std::out_of_range π
okay bestie, welcome to the Library Functions Manual page for std::out_of_range β she's a whole exception class and she's here to tell you when something is just too much for the range it was given. let's get into it π
β¨ NAME β¨
std::out_of_range
that's it. that's the name. iconic behavior honestly π
β¨ SYNOPSIS β¨
#include <stdexcept_except.h>
Inherits std::logic_error.
so yes she's a logic_error girlie, the family tree is real πΈ
π¦ Public Member Functions π¦
out_of_range (const char *)out_of_range (const out_of_range &)=defaultout_of_range (const string &__arg)out_of_range (out_of_range &&)=defaultout_of_range & operator= (const out_of_range &)=defaultout_of_range & operator= (out_of_range &&)=defaultvirtual const char * what () const noexcept
look at her. copy ctor, move ctor, both assignment operators, all =default β she's literally just vibing with the compiler-generated versions and we respect it π«Ά
β¨ Detailed Description β¨
so here's the tea: this class represents an argument whose value is not within the expected range (e.g., boundary checks in basic_string). π
translation? somebody handed over a value that's, like, outside the vibe zone, and instead of silently doing something unhinged, the library throws this. very main character of it to be honest.
β¨ 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 literally the same string passed to the ctor. no cap. what you put in is what you get out. π
- Reimplemented from
std::exception. - Reimplemented in
std::future_error. - References
what(). - Referenced by
what().
yes she references herself and gets referenced by herself. circular queen behavior. we don't question it, we just appreciate it. β¨
β¨ Author β¨
Generated automatically by Doxygen for libstdc++ from the source code.
and that's the whole page bestie, no notes π
this was libstdc++'s std::out_of_range manual page, brought to you by the source code itself β slay, stay in range, and if you can't, at least throw something useful. 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