[patch] Finishing touch for the std::error_code transition

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jun 13 09:50:59 PDT 2014


On 13 June 2014 12:32, Chandler Carruth <chandlerc at google.com> wrote:
> This is a pretty nifty hack. =D
>
> One question, can we really use std::generic_category for all of these
> codes? The actual standard library splits betwene generic_category and
> system_category IIRC. I'm wondering if we have to implement our own category
> that manages extracting the relevant bits of information under the hood.
>
> Thoughts?

I think we can.

Using std::make_error_code(std::errc::..) creates an error_code with
the generic category. Since we use the same values, this is just
another code path for creating the same error_code.

Cheers,
Rafael



More information about the llvm-commits mailing list