Remix.run Logo
creato 3 days ago

This is actually C and C++ has not done something similar AFAIK.

Fulgen 2 days ago | parent | next [-]

https://en.cppreference.com/w/cpp/utility/unreachable.html

hn_go_brrrrr 2 days ago | parent | prev | next [-]

Fortunately the major compiler vendors all have. Routing around the standards committee is getting more and more common.

TuxSH 2 days ago | parent | prev [-]

C++23 does have std::unreachable (as a function), and its counterpart [[assume(expr)]]