Re:Three new utility functions in C++23
by dahfizz on Wednesday November 09, 2022 @09:12AM
(#33531829)
In a real codebase, this would be wrapped by a macro to abort in a debug build but gain the optimizations in a release build.
[ Parent
| on HN ]
cppreference suggests this as an implementation for std::unreachable but as near as I can tell neither clang nor MSVC does that (yet?).
Re:Three new utility functions in C++23
by leni536 on Wednesday November 09, 2022 @03:51PM
(#33537656)
I would have expected the _LIBCXX_ASSERTIONS macro in libc++ to affect the behavior, similarly to many other standard library undefined behaviors.
Re:Three new utility functions in C++23
by actionfromafar on Wednesday November 09, 2022 @11:48AM
(#33534252)
Can't help but feel offended that my codebase isn't real. Thanks for the laugh though :-D
I'd rather have solid logging and/or abort handling than some extra yak hairs shaved off the speed on my release builds. I'm weird that way.