# std::future_error::code

> C++ Atlas: `cppatlas.com/w/cpp/thread/future_error/code` | Source: https://en.cppreference.com/w/cpp/thread/future_error/code | Domain: Concurrency support | Standards: C++11

Returns the stored error code.

## Official Specification Summary (cppreference)

```cpp
const std::error_code& code() const noexcept; // (since C++11)
```

Returns the stored error code.

### Parameters

(none)

### Return value

The stored error code.

### See also

- [`what`](https://en.cppreference.com/w/cpp/thread/future_error/what): returns the explanatory string specific to the error code (public member function)

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