# std::error_condition::clear

> C++ Atlas: `cppatlas.com/w/cpp/error/error_condition/clear` | Source: https://en.cppreference.com/w/cpp/error/error_condition/clear | Domain: Diagnostics | Standards: C++11

Clears the state of the error condition. Sets the error value to 0 and error category to std::generic_category.

## Official Specification Summary (cppreference)

```cpp
void clear() noexcept; // (since C++11)
```

Clears the state of the error condition. Sets the error value to `​0​` and error category to `std::generic_category`.

### Parameters

(none)

### Return value

(none)

---
Attribution: content from https://en.cppreference.com/w/cpp/error/error_condition/clear (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.