<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Oct 22, 2018 at 5:58 AM Louis Dionne 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"><div style="word-wrap:break-word;line-break:after-white-space"><div><blockquote type="cite"><div>On Oct 19, 2018, at 3:18 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:</div><br class="m_-1968178457354519047Apple-interchange-newline"><div><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" target="_blank">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></div></blockquote><div><br></div><div>That makes a lot of sense. This means we have an official or unofficial "contract" with libstdc++ not to put those symbols in a versioned namespace.</div></div></div></blockquote><div><br></div><div>Right.</div><div>We (the libc++ maintainers and the libstdc++ maintainers) agree that it would be nice to be able to mix code, and so we do this (and a couple other things) to make it so. For example, the libc++ exception classes look weird, but that's so they work like the libstdc++ ones.</div><div><br></div><div>-- Marshall</div></div></div>