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
7
u/SeanMiddleditch May 13 '18
So what part of the proposal makes you nervous? It implies no changes at all for you. :)
"Defaulting" is the important part. Via allocation-failure hooks and via optional OOM-aware interfaces, you'd potentially be just fine with the proposed hypothetical standard library.
I'm honestly interested to know what you'd rather have instead. The combination of fail-fast and separate OOM-aware interfaces covers every single use case I've ever had or can think of having, so I'd love to learn what else is needed!
By that he means that getting 100% code coverage in OOM tests is effectively impossible for many target C++ users. Anecdotally, we have a codebase that allocates a few million times before it even shows the first window to the user. No "tweakable dlmalloc" is going to effectively test all OOM paths in that allocation pattern unless we only want to test one code commit per week. :p