<div dir="ltr">What happens for an invalid test case like:<div><br><div><div>template <typename T></div><div>struct S {</div><div> void f(T t) {</div><div> t = 42;</div><div> }</div><div>};</div><div>template<> void __cdecl S<void*>::f(void*);</div>
<div>void g(S<void*> s, void* p) {</div><div> s.f(p);</div><div>}</div></div><div><br></div></div><div>MSVC rejects this with "error C2373: 'S<T>::f' : redefinition; different type modifiers". Do we just paper that over and adjust to __thiscall? Maybe the right thing is to use a comparison that knows how to overlook implicit CC differences, but knows about explicit CC differences.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 1:25 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">The attached patch fixes pr18141 by taking the calling convention into<br>
consideration when looking for which member is being specialized.<br>
<br>
Without this patch clang falls of<br>
<br>
if (!Instantiation) {<br>
// There is no previous declaration that matches. Since member<br>
// specializations are always out-of-line, the caller will complain about<br>
// this mismatch later.<br>
return false;<br>
}<br>
<br>
But nothing complains, so there might be something else wrong in here.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>