[PATCH] Add std::future_error constructor from future_errc

2016-11-11 Thread Jonathan Wakely
At the WG21 meeting we just approved a change to replace the exposition-only constructor for future_error with a constructor taking a future_errc error code enum instead. This adds it, making the existing not-required-by-the-standard constructor private. * include/std/future (future_error

Re: [PATCH] Add std::future_error constructor from future_errc

2016-11-11 Thread Tim Song
On Fri, Nov 11, 2016 at 10:39 PM, Jonathan Wakely wrote: > making the existing not-required-by-the-standard constructor private. > + public: > +explicit > +future_error(error_code __ec) > +: logic_error("std::future_error: " + __ec.message()), _M_code(__ec)+ > { } That doesn't l

Re: [PATCH] Add std::future_error constructor from future_errc

2016-11-12 Thread Jonathan Wakely
On 12/11/16 02:34 -0500, Tim Song wrote: On Fri, Nov 11, 2016 at 10:39 PM, Jonathan Wakely wrote: making the existing not-required-by-the-standard constructor private. + public: +explicit +future_error(error_code __ec) +: logic_error("std::future_error: " + __ec.message()), _M_c