# std::packaged_task<R(Args...)>::~packaged_task

> C++ Atlas: `cppatlas.com/w/cpp/thread/packaged_task/~packaged_task` | Source: https://en.cppreference.com/w/cpp/thread/packaged_task/~packaged_task | Domain: Concurrency support

Abandons the shared state and destroys the stored task object.

## Official Specification Summary (cppreference)

```cpp
~packaged_task();
```

Abandons the shared state and destroys the stored task object.

As with `std::promise::~promise`, if the shared state is abandoned before it was made ready, an `std::future_error` exception is stored with the error code `std::future_errc::broken_promise`).

### Parameters

(none)

### Example

> Note: This section is incomplete Reason: no example

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