<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, 17 Oct 2018 at 11:44, Ben Craig via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">"Magic" types that the compiler / core language know about don't go in the versioned namespace.<br></blockquote><div><br></div><div>That certainly applies to things like std::type_info, std::initializer_list, and std::bad_alloc, but std::exception is not special in this regard.</div><div><br></div><div>Rather, I think the reason we don't version std::exception is so that in code that mixes use of libc++ and libstdc++, one can throw an exception derived from std::exception using one library and catch it using the other library. (A special case of that: the default 'terminate' handler can print out details of the thrown exception if it's derived from std::exception, even if it's using the std::exception from a different stdlib.)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> -----Original Message-----<br>
> From: libcxx-dev <<a href="mailto:libcxx-dev-bounces@lists.llvm.org" target="_blank">libcxx-dev-bounces@lists.llvm.org</a>> On Behalf Of Louis<br>
> Dionne via libcxx-dev<br>
> Sent: Wednesday, October 17, 2018 1:33 PM<br>
> To: <a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>
> Subject: [libcxx-dev] Question: Why are std::exception & friends not in a<br>
> versioned namespace?<br>
> <br>
> The title of the message pretty much says everything. I’m wondering why<br>
> `std::exception` is not `std::__1::exception` instead — most symbols are in<br>
> the versioned namespace, but not this one.<br>
> <br>
> Thanks,<br>
> Louis<br>
> <br>
> _______________________________________________<br>
> libcxx-dev mailing list<br>
> <a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-</a><br>
> 2Dbin_mailman_listinfo_libcxx-<br>
> 2Ddev&d=DwIGaQ&c=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA&r=y8<br>
> mub81SfUi-UCZRX0Vl1g&m=SXXSmQhIwn-A25pzcb_sggzAo2-eOJsf6qXxNo-<br>
> nK0Y&s=CmmWD_6xN8H21UexX902giBa7RN0TM7POgqsYXG34VA&e=<br>
_______________________________________________<br>
libcxx-dev mailing list<br>
<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a><br>
</blockquote></div></div>