4 ms·
The "nothrow" is not part of the function signature, probably in order not to break retro-compatibility. Without this, "nothrow" cannot be enforced reliably at
by Rexxar 10y ago
The "nothrow" is not part of the function signature, probably in order not to break retro-compatibility. Without this, "nothrow" cannot be enforced reliably at compile time. And I think they don't want to add a new sort of undefined behaviour if a function from a linked module doesn't respect the nothrow promise at runtime.
- maxlybbert 10y agoYou are right, even nothrow doesn't fix the weirdness with signatures. However, nothrow allows a program to change behavior based on whether a function it will call will throw exceptions. That wasn't available under the old exception specification mechanism.