# C++ keyword: `co_return` (since C++20)

From cppreference.com
< cpp‎ | keyword

### Usage

- `return` statement in a coroutine

### See also

- `if` statement: `if`, `else`

`constexpr` `if` statement: `constexpr` (`constexpr` `if` statement) | (since C++17)
`consteval` `if` statement: `consteval` (`consteval` `if` statement) | (since C++23)

- `switch` statement: `switch`, `case`
- `default` (as case label declaration) etc: `default`
- `goto` statement: `goto`
- `continue` statement: `continue`
- `break` statement: `break`
- `return` statement: `return`

- `do-while` loop and `while` loop: `do`, `while`
- `for` loop and range-based `for` loop: `for`
- coroutines: `co_await`, `co_yield`

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/keyword/co_return&oldid=176232"