1.2 KiB
1.2 KiB
[utility.undefined]
22 General utilities library [utilities]
22.2 Utility components [utility]
22.2.9 Undefined behavior [utility.undefined]
[[noreturn]] void unreachable();
Preconditions: false is true.
[Note 1:
This precondition cannot be satisfied, thus the behavior of calling unreachable is undefined.
â end note]
[Example 1: int f(int x) {switch (x) {case 0:case 1:return x; default: std::unreachable(); }}int a = f(1); // OK, a has value 1int b = f(3); // undefined behavior â end example]
void observable_checkpoint() noexcept;
Effects: Establishes an observable checkpoint ([intro.abstract]).