4 ms·
> And this "C++ with exceptions disabled" language defines that exceptions terminate the program. Except that's not a language that is standardized, so there's
by kelnos 4y ago
> And this "C++ with exceptions disabled" language defines that exceptions terminate the program.
Except that's not a language that is standardized, so there's nothing that defines anything here. GCC and Clang may call std::terminate() when exceptions are disabled and some library/dependency throws, but unless your build process aborts when a compiler other than GCC or Clang is used, you can't rely on that behavior in general.
- mort96 4y agoAs I wrote in response to your sibling comment which pointed out exactly the same thing: Correct! It's a language defined ad-hoc by GCC and Clang. GCC's man page describes its behavior with '-fno-exceptions' to be essentially: act like a normal C++ compiler, except produce code which calls abort() where it would otherwise have engaged the exception throwing machinery. That defines a kind of "C++ with exceptions disabled" language, but it's not a standard.