# std::suspend_never

> C++ Atlas: `cppatlas.com/w/cpp/coroutine/suspend_never` | Source: https://en.cppreference.com/w/cpp/coroutine/suspend_never | Domain: Coroutine support | Standards: C++20

suspend_never is an empty class which can be used to indicate that an await expression never suspends and does not produce a value.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <coroutine>
struct suspend_never; // (since C++20)
```

`suspend_never` is an empty class which can be used to indicate that an await expression never suspends and does not produce a value.

#### Member functions

- `await_ready`: indicates that an await expression never suspends (public member function)
- `await_suspend`: no-op (public member function)
- `await_resume`: no-op (public member function)

### std::suspend_never::await_ready

```cpp
constexpr bool await_ready() const noexcept { return true; }
```

Always returns `true`, indicating that an await expression never suspends.

### std::suspend_never::await_suspend

```cpp
constexpr void await_suspend( std::coroutine_handle<> ) const noexcept {}
```

Does nothing.

### std::suspend_never::await_resume

```cpp
constexpr void await_resume() const noexcept {}
```

Does nothing. An await expression does not produce a value if `suspend_never` is used.

#### Example

> Note: This section is incomplete Reason: no example

#### See also

- [`suspend_always`](https://en.cppreference.com/w/cpp/coroutine/suspend_always) (C++20): indicates that an await-expression should always suspend (class)

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