17 Language support library [support]

17.14 Other runtime support [support.runtime]

17.14.3 Header <csetjmp> synopsis [csetjmp.syn]

#define __STDC_VERSION_SETJMP_H__ 202311L namespace std { using jmp_buf = see below; [[noreturn]] void longjmp(jmp_buf env, int val); } #define setjmp(env) see below
The contents of the header <csetjmp> are the same as the C standard library header <setjmp.h>.
The function signature longjmp(jmp_buf jbuf, int val) has more restricted behavior in this document.
A setjmp/longjmp call pair has undefined behavior if replacing the setjmp and longjmp by catch and throw would invoke any non-trivial destructors for any objects with automatic storage duration.
A call to setjmp or longjmp has undefined behavior if invoked in a suspension context of a coroutine ([expr.await]).
See also: ISO/IEC 9899:2024, 7.13

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant