<div dir="ltr"><div dir="ltr"><div dir="ltr">On Mon, Feb 4, 2019 at 3:22 PM Reid Kleckner via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>I see there is an update suggesting that this is an issue in the STL:</div><div><a href="https://bugs.llvm.org/show_bug.cgi?id=32072#c3" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=32072#c3</a><br></div><div><br></div><div>However, I think there is still an argument to be made that clang should "do what MSVC does" here. I suppose it's not clear what that is, though.</div></div></div></blockquote><div><br></div><div>Recentish (IIRC since roughly VS2017 15.8) versions of MSVC would diagnose the attempt to evaluate __is_convertible_to(T, U) for an incomplete class type T as ill-formed. Clang, IIUC, simply yields `false`. (The behavior of a program that evaluates `std::is_convertible<T, U>` for an incomplete class type T is formally undefined per <a href="http://eel.is/c++draft/meta#rqmts-5">http://eel.is/c++draft/meta#rqmts-5</a>, so both implementations are conforming depending on the reader's interpretation of "undefined behavior" vs. "ill-formed with no diagnostic required".)</div><div><br></div><div>Note that neither behavior allows the subject program to compile and do what the submitter expects: changing clang to mirror the MSVC behavior would result in the program being ill-formed with a diagnostic instead of being ill-formed due to ODR violation. Doing as the submitter expects requires a change to the Standard Library to avoid asking the broken question in the first place.</div></div></div></div>