std::logic_error(3cxx)
okay so this is the std::logic_error(3cxx) page from the libstdc++ manual β manual name folded in near the top like a little name tag, because we are not copying that header line, bestie π«Ά
πΈ NAME πΈ
std::logic_error β literally one of two subclasses of exception. That's the whole name-and-title situation, no cap.
β¨ SYNOPSIS β¨
#include <stdexcept>
Inherits std::exception. π
Inherited by:
__gnu_pbds::container_errorstd::domain_errorstd::experimental::fundamentals_v1::bad_optional_accessstd::future_errorstd::invalid_argumentstd::length_errorstd::out_of_range
π Public Member Functions π
logic_error (const char *) _GLIBCXX_TXN_SAFEβ signature drop, exactly as written; no extra lore attached.logic_error (const logic_error &)=defaultβ copy constructor, defaulted, living its best compiler-generated life.logic_error (const string &__arg) _GLIBCXX_TXN_SAFEβ another constructor signature, verbatim.logic_error (logic_error &&) noexceptβ move constructor,noexceptand everything.logic_error & operator= (const logic_error &)=defaultβ copy assignment, defaulted.logic_error & operator= (logic_error &&) noexceptβ move assignment,noexcept.virtual const char * what () const noexceptβ virtualwhat(),noexcept.
π Detailed Description π
std::logic_error is one of two subclasses of exception. Periodt.
Logic errors represent problems in the internal logic of a program; in theory, these are preventable, and even detectable before the program runs (e.g., violations of class invariants). That's the whole cautionary tale, bestie β no invented extra rules. π¦
π§ Constructor & Destructor Documentation π§
std::logic_error::logic_error (const string & __arg) [explicit]
Takes a character string describing the error. That's it β the constructor is explicit, and it wants the description string. π
π₯ Member Function Documentation π₯
virtual const char * std::logic_error::what () const [virtual], [noexcept]
Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor). Yep, it's giving "come get the error tea." β
Reimplemented from std::exception.
Reimplemented in std::future_error.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
okay bye bestie π«Ά this is the libstdc++ source/version manual situation, footer title std::logic_error(3cxx), and the date? The original footer doesn't show one, so I'm not inventing a date β that would be a logic error, lowkey ππ
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms