Boost logo

Boost :

Subject: Re: [boost] [outcome] Second high level summary of review feedback accepted so far
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-05 14:46:25


Vicente J. Botet Escriba wrote:

> Oh, in this case it is clear that result<T> is not enough. We need
> expected<T, filesystem::error>
>
> where filesystem:error contains the error_code and the path.

I don't find this particularly appealing, because the whole point of
std::error_code was to avoid the need for each library to define separate
error classes. expected<T, filesystem::error> will work, I'd just not be
willing to recommend it as a general solution.

Something like Niall's new outcome<T> that stores both an error_code and an
exception seems better, because you can use a single common return type in
all libraries.


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