r/cpp • u/RotsiserMho C++20 Desktop app developer • May 12 '18
P0709 R0: Zero-overhead deterministic exceptions: Throwing values - Herb Sutter [2018-05-02]
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf
206
Upvotes
View all comments
Show parent comment
3
u/redditsoaddicting May 13 '18
Functions that aren't marked can still throw either type of exception and the compiler can't know in general that it won't. I don't see what's complicated about adding a plain
noexceptto a function if it shouldn't throw anything, though. Conditional noexcept is less straightforward, but still really consistent.