std::error_category(3)

πŸ“¦
version 15.3.1 Β· 4 versions
, in fedora 43

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

okay bestie, listen up β€” this is the Library Functions Manual page for std::error_category, and yes it's from libstdc++, and yes we're gonna get through it together. grab a snack. πŸ“


✨ NAME ✨

std::error_category β€” the abstract queen bee of error categories πŸ‘‘


🌸 SYNOPSIS 🌸

#include <system_error>

πŸŽ€ Public Member Functions πŸŽ€

  • error_category (const error_category &)=delete β€” no copying, we don't do that here πŸ™ˆ
  • virtual error_condition default_error_condition (int __i) const noexcept β€” hands you back the error_condition that matches i in this category.
  • virtual bool equivalent (const error_code &__code, int __i) const noexcept β€” vibe-checks whether code corresponds to i for this category.
  • virtual bool equivalent (int __i, const error_condition &__cond) const noexcept β€” vibe-checks whether cond corresponds to i for this category.
  • virtual string message (int) const =0 β€” the description of the error condition that goes with that number.
  • virtual const char * name () const noexcept=0 β€” the string that says which error category this is.
  • strong_ordering operator<=> (const error_category &__rhs) const noexcept β€” ordered comparison, and it defines a total order for error categories, periodt.
  • error_category & operator= (const error_category &)=delete β€” also no copy-assigning, sorry bestie πŸ’€
  • bool operator== (const error_category &__other) const noexcept β€” an error_category only ever compares equal to itself. main character energy fr fr.

πŸ¦‹ Detailed Description πŸ¦‹

Abstract base class for types that define a category of error codes. πŸ’…

An error category defines a context that gives meaning to the integer stored inside an error_code or error_condition object. like, the number alone means nothing until the category tells you what it means. for example, the standard errno constants such as EINVAL and ENOMEM are associated with the "generic" category, and other OS-specific error numbers are associated with the "system" category β€” but a user-defined category might give totally different meanings to those exact same numerical values. no cap.

A user-defined category can override the equivalent member functions to define correspondence between errors in different categories. for example, a category for errors from disk I/O could consider some of its error numbers equivalent to ENOSPC and ENOENT in the generic category. ✨

Since

C++11

πŸ’… Member Function Documentation πŸ’…

🌈 virtual error_condition std::error_category::default_error_condition (int __i) const [virtual], [noexcept]

Return an error_condition corresponding to i in this category. 🫢

🌈 virtual bool std::error_category::equivalent (const error_code & __code, int __i) const [virtual], [noexcept]

Test whether code corresponds to i for this category. πŸ”₯

🌈 virtual bool std::error_category::equivalent (int __i, const error_condition & __cond) const [virtual], [noexcept]

Test whether cond corresponds to i for this category. πŸ”₯

🌈 virtual string std::error_category::message (int ) const [pure virtual]

A description of the error condition corresponding to the number. πŸ‘‘

References message().

Referenced by message(), std::error_code::message(), and std::error_condition::message().

🌈 virtual const char * std::error_category::name () const [pure virtual], [noexcept]

A string that identifies the error category. πŸŽ€

🌈 strong_ordering std::error_category::operator<=> (const error_category & __rhs) const [inline], [nodiscard], [noexcept]

Ordered comparison that defines a total order for error categories. ⭐

References operator<=>().

Referenced by operator<=>().

🌈 bool std::error_category::operator== (const error_category & __other) const [inline], [noexcept]

An error_category only compares equal to itself. πŸ’€


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. (not a human, just a robot doing its lil thing πŸ€–βœ¨)


and that's the whole page bestie!! this one came straight outta the libstdc++ docs β€” <rainbow>libstdc++</rainbow>, std::error_category(3), that's the source and the version tag at the bottom of the page, iykyk. πŸ¦‹πŸ’– go forth and categorize your errors, you absolute icon. 🫢

πŸ“¦ where this page comes from
  • fedora 43: libstdc++-docs 15.2.1-2.fc43 Β· 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 43: libstdc++-docs 15.3.1-1.fc43 Β· 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