[syserr.errcode.nonmembers]

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

## 19.5 System error support [[syserr]](syserr#errcode.nonmembers)

### 19.5.4 Class error_code [[syserr.errcode]](syserr.errcode#nonmembers)

#### 19.5.4.5 Non-member functions [syserr.errcode.nonmembers]

[ð](#lib:make_error_code,errc)

`error_code make_error_code(errc e) noexcept;
`

[1](#1)

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

*Returns*: error_code(static_cast<int>(e), generic_category())[.](#1.sentence-1)

[ð](#lib:operator%3c%3c,error_code)

`template<class charT, class traits>
  basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const error_code& ec);
`

[2](#2)

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

*Effects*: Equivalent to: return os << ec.category().name() << ':' << ec.value();
