<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 13, 2014 at 5:50 PM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 13 June 2014 12:32, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br>

> This is a pretty nifty hack. =D<br>
><br>
> One question, can we really use std::generic_category for all of these<br>
> codes? The actual standard library splits betwene generic_category and<br>
> system_category IIRC. I'm wondering if we have to implement our own category<br>
> that manages extracting the relevant bits of information under the hood.<br>
><br>
> Thoughts?<br>
<br>
</div>I think we can.<br>
<br>
Using std::make_error_code(std::errc::..) creates an error_code with<br>
the generic category. Since we use the same values, this is just<br>
another code path for creating the same error_code.</blockquote></div><br>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.</div>
</div>