[syserr.errcat.derived]

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

## 19.5 System error support [[syserr]](syserr#errcat.derived)

### 19.5.3 Class error_category [[syserr.errcat]](syserr.errcat#derived)

#### 19.5.3.4 Program-defined classes derived from error_category [syserr.errcat.derived]

[ð](#lib:name,error_category)

`virtual const char* name() const noexcept = 0;
`

[1](#1)

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

*Returns*: A string naming the error category[.](#1.sentence-1)

[ð](#lib:default_error_condition,error_category)

`virtual error_condition default_error_condition(int ev) const noexcept;
`

[2](#2)

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

*Returns*: An object of type error_condition that corresponds to ev[.](#2.sentence-1)

[ð](#lib:equivalent,error_category)

`virtual bool equivalent(int code, const error_condition& condition) const noexcept;
`

[3](#3)

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

*Returns*: true if, for the category of error represented by *this, code is considered equivalent to condition; otherwise, false[.](#3.sentence-1)

[ð](#lib:equivalent,error_category_)

`virtual bool equivalent(const error_code& code, int condition) const noexcept;
`

[4](#4)

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

*Returns*: true if, for the category of error represented by *this, code is considered equivalent to condition; otherwise, false[.](#4.sentence-1)
