return statement
From cppreference.com
Terminates the current function and returns the specified value (if any) to the caller.
Contents |
[edit] Syntax
attr (optional) return expression (optional) ;
|
(1) | ||||||||
attr (optional) return braced-init-list ;
|
(2) | (since C++11) | |||||||
attr (optional) co_return expression (optional) ;
|
(3) | (since C++20) | |||||||
attr (optional) co_return braced-init-list ;
|
(4) | (since C++20) | |||||||
| attr | - | (since C++11) sequence of any number of attributes |
| expression | - |