3 Jun
2017
3 Jun
'17
6:56 a.m.
Le 01/06/2017 à 20:30, Peter Dimov via Boost a écrit :
Robert Ramey wrote:
or
template<class T> struct outcome : public std::variant
{ // some special member functions outcome(const std::error_code & e){...} // construct as error outcome(const T & t){...} // construct legitimate result }; Something like this?
https://github.com/pdimov/variant2/blob/develop/include/boost/variant2/resul...
Thanks Peter for working on this. We need such a variant2 at least in Boost. As you show, building on top of a sound class makes the implementation much simpler. Best, Vicente