[patch] Finishing touch for the std::error_code transition
chandlerc at google.com
Fri Jun 13 10:09:04 PDT 2014
On Fri, Jun 13, 2014 at 5:59 PM, Rafael Espíndola <
rafael.espindola at gmail.com> wrote:
> > It means that there are std::errc::... values which we will hand to the
> > generic_category virtual methods which would never get handed to them in
> > standard library because in the standard library these values are always
> > paired with system_category.
> Not always. Since std::make_error_code will put them in the
> generic_caterory, any method in the generic category has to be able to
> handle them, no?
Ahh, I see.
So generic_category will have to be capable of handling them... And the
whole equivalent virtual dispatch thing is to allow these to compare for
equality with random non-portable things...
NM, I think I see how this ends up working now. We sacrifice portable
equality testing of these enums by forcing them into error_code, but
everything still works. And we're OK without the portable equality testing
because we own all the interfaces and can force them to *all* use this enum.
LGTM! Sorry for the confusion.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits