4 ms·
How is _LIBCPP_ASSERT implemented? I know that GCC can make more intelligent optimizations when you explicitly rule out user-level undefined behavior as in:
by CyberRabbi 6y ago
How is _LIBCPP_ASSERT implemented? I know that GCC can make more intelligent optimizations when you explicitly rule out user-level undefined behavior as in:
if (will_not_happen()) {
__builtin_unreachable();
}
In the specific case highlighted in this article will_not_happen() can be replaced with “hi < lo”.