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 callingmake_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 whethervalue()is non-zero.error_condition & operator= (const error_condition &)=defaultβ assignment, defaulted, iconic.int value () const noexceptβ the error value.
π Related Symbols π
Heads up bestie: these are not member symbols. Just vibing nearby. π
error_condition make_error_condition (errc __e) noexceptstrong_ordering operator<=> (const error_condition &__lhs, const error_condition &__rhs) noexceptbool operator== (const error_code &__lhs, const error_code &__rhs) noexceptbool operator== (const error_code &__lhs, const error_condition &__rhs) noexceptbool 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