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

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


> 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 the
> 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?

For example, in libc++ we have:

inline _LIBCPP_INLINE_VISIBILITY
error_code
make_error_code(errc __e) _NOEXCEPT
{
    return error_code(static_cast<int>(__e), generic_category());
}

Cheers,
Rafael



More information about the llvm-commits mailing list