Boost logo

Boost :

Subject: Re: [boost] [outcome] Second high level summary of review feedback accepted so far
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2017-06-05 18:31:01


Le 05/06/2017 à 16:46, Peter Dimov via Boost a écrit :
> 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.
Let define filesystem::error as we consider is the more pertinent. You
don't need a specific expected/outcome/xxxxx class to cover this case.
Do you?

Vicente


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