Boost logo

Boost :

Subject: Re: [boost] [outcome] Requesting second pre-review of Boost.Outcome tutorial
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2017-01-17 06:33:16


Hi,

> Again, only if the damn ISO standard
> required compilers to refuse to compile functions which could throw
> exceptions inside a noexcept execution context ...

I disagree here. In many applications I would consider functions
noexcept even
when they can, in theory, throw. Best example is "out of memory" aka "pc
lit on fire".
Exception handling of rare exceptions is probably among the least tested
control paths,
so I would often rather terminate in the case of an "unexpected
exception" than go on and gamble
whether my exception handling is going to die trying to overwrite my
last good program state on disk.

Therefore, compiler noise like that would probably lead to random

try{...}catch(...){}

inside all noexcept functions rather quickly.

Best,
Oswin


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk