[syserr.errcondition.constructors]

# 19 Diagnostics library [[diagnostics]](./#diagnostics)

## 19.5 System error support [[syserr]](syserr#errcondition.constructors)

### 19.5.5 Class error_condition [[syserr.errcondition]](syserr.errcondition#constructors)

#### 19.5.5.2 Constructors [syserr.errcondition.constructors]

[ð](#lib:error_condition,constructor)

`error_condition() noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L1284)

*Effects*: Initializes *val_* with 0 and *cat_* with &generic_category()[.](#1.sentence-1)

[ð](#lib:error_condition,constructor_)

`error_condition(int val, const error_category& cat) noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L1296)

*Effects*: Initializes *val_* with val and *cat_* with &cat[.](#2.sentence-1)

[ð](#lib:error_condition,constructor__)

`template<class ErrorConditionEnum>
  error_condition(ErrorConditionEnum e) noexcept;
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L1309)

*Constraints*: is_error_condition_enum_v<ErrorConditionEnum> is true[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L1313)

*Effects*: Equivalent to:error_condition ec = make_error_condition(e);
assign(ec.value(), ec.category());
