# std::nested_exception::operator=

> C++ Atlas: `cppatlas.com/w/cpp/error/nested_exception/operator=` | Source: https://en.cppreference.com/w/cpp/error/nested_exception/operator= | Domain: Diagnostics | Standards: C++11, C++26

Replaces the stored exception with the one held in other.

## Official Specification Summary (cppreference)

```cpp
nested_exception& operator=( const nested_exception& other ) noexcept = default; // (since C++11) (constexpr since C++26)
```

Replaces the stored exception with the one held in `other`.

### Parameters

- `other` - nested exception to replace the contents with

### Return value

`*this`

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