Re:Transmission torrent client ported to C++
by dodobirdlord on Sunday September 12, 2021 @09:38PM
(#28506951)
Well, you could compile everything with noexcept and not use exceptions, but that would certainly make large chunks of the STL useless.
[ Parent
| on HN ]
Re:Transmission torrent client ported to C++
by _b on Sunday September 12, 2021 @11:07PM
(#28507464)
What? Everything in the STL works fine without exceptions. Only wrinkle is if one wants to handle out of memory in way besides crashing, although there is generally nothing better to do. Besides, the kernel will often kill processes rather than return malloc failures (see the OOM killer) anyway.
Re:Transmission torrent client ported to C++
by dodobirdlord on Tuesday September 14, 2021 @01:34PM
(#28528029)
IIRC, STL constructors throw if they can’t run successfully. I suppose if you’re sure that OOM is the only thing that is going to cause constructors to fail, you can just live with allocation failures causing program termination.