Files
cppdraft_translate/cppdraft/syserr/errcondition/overview.md
2025-10-25 03:02:53 +03:00

30 lines
1.7 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[syserr.errcondition.overview]
# 19 Diagnostics library [[diagnostics]](./#diagnostics)
## 19.5 System error support [[syserr]](syserr#errcondition.overview)
### 19.5.5 Class error_condition [[syserr.errcondition]](syserr.errcondition#overview)
#### 19.5.5.1 Overview [syserr.errcondition.overview]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L1238)
The class error_condition describes an object used to hold values identifying
error conditions[.](#1.sentence-1)
[*Note [1](#note-1)*:
error_condition values are portable abstractions,
while error_code values ([[syserr.errcode]](syserr.errcode "19.5.4Class error_­code")) are implementation specific[.](#1.sentence-2)
— *end note*]
[🔗](#lib:error_condition)
namespace std {class error_condition {public:// [[syserr.errcondition.constructors]](syserr.errcondition.constructors "19.5.5.2Constructors"), constructors error_condition() noexcept;
error_condition(int val, const error_category& cat) noexcept; template<class ErrorConditionEnum> error_condition(ErrorConditionEnum e) noexcept; // [[syserr.errcondition.modifiers]](syserr.errcondition.modifiers "19.5.5.3Modifiers"), modifiersvoid assign(int val, const error_category& cat) noexcept; template<class ErrorConditionEnum> error_condition& operator=(ErrorConditionEnum e) noexcept; void clear() noexcept; // [[syserr.errcondition.observers]](syserr.errcondition.observers "19.5.5.4Observers"), observersint value() const noexcept; const error_category& category() const noexcept;
string message() const; explicit operator bool() const noexcept; private:int *val_*; // *exposition only*const error_category* *cat_*; // *exposition only*};}