##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::packaged_task::valid

From cppreference.com
< cpp‎ | thread‎ | packaged task

bool valid() const; |  | (since C++11)

Checks whether *this has a shared state.

### [edit] Parameters

(none)

### [edit] Return value

true if *this has a shared state, false otherwise.

### [edit] Exceptions

`noexcept` specification:
noexcept
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/thread/packaged_task/valid&oldid=91670"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template