Subject: Re: [boost] [err] RFC
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2015-11-29 22:45:36
On 30/11/2015 16:18, Domagoj Å ariÄ wrote:
> On Fri, 27 Nov 2015 04:56:32 +0530, Gavin Lambert <gavinl_at_[hidden]>
>> It does make the behaviour a little strange for the various cases though:
>> calcA(); // throws because fallible_result went uninspected
> That's intended/by design behaviour, 'the classic EH style usage' (the
> throw happens only if the call failed, i.e. the return value contains an
> err_t, not T, so the err_t is thrown, with a possible transformation into
> an object/wrapper more apt for EH but those are details I'd rather not go
> at this stage)...what problem do you see here?
I'm not calling out the cases individually as problems, I'm trying to
point out that the set as a whole seems inconsistent, and somewhat
surprising with regard to "auto" and (at least for the original
implementation) with the asserts. Maybe I'm just being too nitpicky though.
They were intended to cover all usages, though I know there are some
that I missed (such as use of operator*).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk