|
Boost : |
Subject: Re: [boost] Outcome/expected/etc/etc/etc
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-06-06 09:26:07
> Let's see if I got it correctly.
>
> I, the user of your library, have to make the choice:
> 1. Either I get minimum-overhead (trivially-copyable) `result<T>`, with
> limited ability to carry payload.
> 2. Or I get ability to carry any payload, but at the expense of paying the
> cost of copying `outcome<T>`s.
>
> Since filesystem_error already has non-trivial copy, I loose nothing when
> going with option 2 (using `outcome<T>`).
Even outcome<T> in current Outcome already charges you the expense of
carrying arbitrary payload which is why it has non-trivial
copy/move/destruct.
But tl;dr; the answer is you have it correct.
Niall
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk