Boost logo

Boost :

Subject: Re: [boost] [outcome] Second high level summary of review feedback accepted so far
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-06-06 23:02:05


On 6/06/2017 21:23, Niall Douglas wrote:
> Also, if you want the TRY operation to work (and you really, really do,
> it is an enormous boilerplate saver), then your error type needs to be
> identical throughout your program. Templating it breaks that.

Why does it need to be identical? Can't you just use
decltype(r.error())? As long as you know that at minimum it supports
the error_code interface this should be sufficient for most purposes.

> I am currently minded to have error_code_extended no longer store a 191
> byte string which lets me pack many more of them into a reasonably sized
> ringbuffer. If people want to store a string, I am minded they should be
> either supplying a static const char * or else return an outcome<T> with
> shared_ptr payload to strings.

How would they do such a payload for an error case?


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