std::error_condition(3)

πŸ¦‹ NAME πŸ¦‹

std::error_condition β€” bestie, this is the manual page for it (you know, std::error_condition(3) from the Library Functions Manual πŸ’…). It's the lil class that says "hey, something went wrong at my API boundary" and lets your program check for it and deal with it. Periodt.


✨ SYNOPSIS ✨

#include <system_error>

🌸 Public Member Functions 🌸

  • error_condition () noexcept β€” starts you off with a zero (no error) value and the generic category. Clean slate energy πŸ’–
  • template<typename _ErrorConditionEnum, typename = _Check<_ErrorConditionEnum>> error_condition (_ErrorConditionEnum __e) noexcept β€” starts you off with a user-defined type, by calling make_error_condition.
  • error_condition (const error_condition &)=default β€” the copy constructor, defaulted, slay.
  • error_condition (int __v, const error_category &__cat) noexcept β€” starts you off with the value and category you specify.
  • void assign (int __v, const error_category &__cat) noexcept β€” sets the value and the category.
  • const error_category & category () const noexcept β€” the error category this error belongs to.
  • void clear () noexcept β€” resets the value and category back to the default-constructed state. Fresh start bestie 🫢
  • string message () const β€” the category's description of the value.
  • operator bool () const noexcept β€” tests whether value() is non-zero.
  • error_condition & operator= (const error_condition &)=default β€” assignment, defaulted, iconic.
  • int value () const noexcept β€” the error value.
Heads up bestie: these are not member symbols. Just vibing nearby. πŸ™ˆ
  • error_condition make_error_condition (errc __e) noexcept
  • strong_ordering operator<=> (const error_condition &__lhs, const error_condition &__rhs) noexcept
  • bool operator== (const error_code &__lhs, const error_code &__rhs) noexcept
  • bool operator== (const error_code &__lhs, const error_condition &__rhs) noexcept
  • bool operator== (const error_condition &__lhs, const error_condition &__rhs) noexcept

🌈 Detailed Description 🌈

Class error_condition

Okay so here's the whole vibe: this class represents error conditions that may be visible at an API boundary. The way that different error_code values can show up inside a library or a module and yet all map to the same error_condition? Obsessed. πŸ”₯

An error_condition represents something that the program can test for, and then subsequently take appropriate action. That's the whole point, and it ate. πŸ’…

Since

C++11 ✨


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

std::error_condition::error_condition () [inline], [noexcept]

Initialize with a zero (no error) value and the generic category.

References std::generic_category().

Referenced by make_error_condition(), operator<=>(), operator==(), and operator==().

std::error_condition::error_condition (int __v, const error_category & __cat) [inline], [noexcept]

Initialize with the specified value and category.

template<typename _ErrorConditionEnum, typename = _Check<_ErrorConditionEnum>> std::error_condition::error_condition (_ErrorConditionEnum __e) [inline], [noexcept]

Initialize with a user-defined type, by calling make_error_condition.

References make_error_condition().


πŸ’– Member Function Documentation πŸ’–

void std::error_condition::assign (int __v, const error_category & __cat) [inline], [noexcept]

Set the value and category.

Referenced by clear().

const error_category & std::error_condition::category () const [inline], [noexcept]

The error category that this error belongs to.

Referenced by message().

void std::error_condition::clear () [inline], [noexcept]

Reset the value and category to the default-constructed state.

References assign(), and std::generic_category().

string std::error_condition::message () const [inline]

The category's description of the value.

References category(), std::error_category::message(), and value().

std::error_condition::operator bool () const [inline], [explicit], [noexcept]

Test whether value() is non-zero.

int std::error_condition::value () const [inline], [noexcept]

The error value.

Referenced by message().


🌟 Author 🌟

Generated automatically by Doxygen for libstdc++ from the source code.


and that's the whole page bestie, no cap, every flag and every reference accounted for 🫢 This gorgeous lil manual page came to you courtesy of libstdc++ and its version of std::error_condition(3) β€” mwah, take care of her πŸ’…πŸŽ€βœ¨

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