| 301 | } |
| 302 | |
| 303 | error_condition __system_error_category::default_error_condition(int ev) const noexcept { |
| 304 | #ifdef _LIBCPP_WIN32API |
| 305 | // Remap windows error codes to generic error codes if possible. |
| 306 | if (ev == 0) |
| 307 | return error_condition(0, generic_category()); |
| 308 | if (auto maybe_errc = __win_err_to_errc(ev)) |
| 309 | return error_condition(static_cast<int>(*maybe_errc), generic_category()); |
| 310 | return error_condition(ev, system_category()); |
| 311 | #else |
| 312 | # ifdef _LIBCPP_ELAST |
| 313 | if (ev > _LIBCPP_ELAST) |
| 314 | return error_condition(ev, system_category()); |
| 315 | # endif // _LIBCPP_ELAST |
| 316 | return error_condition(ev, generic_category()); |
| 317 | #endif |
| 318 | } |
| 319 | |
| 320 | const error_category& system_category() noexcept { |
| 321 | union AvoidDestroyingSystemCategory { |
no test coverage detected