Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Some vendors provide language extensions for specifying whether or not a function throws. For instance, Microsoft Visual Studio provides __declspec(nothrow)), and Clang supports __attribute__((nothrow)). Currently, the vendors do not document the behavior of specifying a nonthrowing function using these extensions. Throwing from a function declared with one of these language extensions is presumed to be undefined behavior.

...

SEI CERT C++ Coding StandardERR50-CPP. Do not call std::terminate(), std::abort(), std::quick_exit(), or std::_Exit()abruptly terminate the program

Bibliography

[GNU]"Declaring Attributes of Functions"
[ISO/IEC 14882-2014]Subclause 15.4, "Exception Specifications"
[MSDN]"nothrow (C++)"

...