1.8 KiB
1.8 KiB
[stmt.jump.general]
8 Statements [stmt]
8.8 Jump statements [stmt.jump]
8.8.1 General [stmt.jump.general]
Jump statements unconditionally transfer control.
jump-statement:
break ;
continue ;
return expr-or-braced-init-listopt ;
coroutine-return-statement
goto identifier ;
[Note 1:
On exit from a scope (however accomplished), objects with automatic storage duration that have been constructed in that scope are destroyed in the reverse order of their construction ([stmt.dcl]).
For temporaries, see [class.temporary].
However, the program can be terminated (by callingstd::exit() orstd::abort() ([support.start.term]), for example) without destroying objects with automatic storage duration.
â end note]
[Note 2:
A suspension of a coroutine ([expr.await]) is not considered to be an exit from a scope.
â end note]