6 Jun
2017
6 Jun
'17
9:26 a.m.
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/