Files
2025-10-25 03:02:53 +03:00

1.8 KiB
Raw Permalink Blame History

[stmt.jump.general]

8 Statements [stmt]

8.8 Jump statements [stmt.jump]

8.8.1 General [stmt.jump.general]

1

#

Jump statements unconditionally transfer control.

jump-statement:
break ;
continue ;
return expr-or-braced-init-listopt ;
coroutine-return-statement
goto identifier ;

2

#

[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]