<div dir="ltr"><div>This:</div><div><br></div><div>struct SomeType {};</div><div>template<typename T> void deduce(T (*)(), ...) {}<br></div><div>template<typename T> void deduce(T f, SomeType g) {}</div><div>void foo() { throw SomeType(); }<br>
</div><div>void bar() { deduce( foo ); }<br></div><div><br></div><div>... works fine on Clang 3.2 and on Clang trunk.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 20, 2014 at 10:18 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@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 dir="ltr">Could you provide a standalone example of the problem? And include a log showing the file contents, the compiler version, the full command used to compile the source as well as all the output (error messages, etc)?<br>

<br>My attempts to reproduce this with ToT Clang seem to have failed - something similar to what you described compiles without error.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Feb 20, 2014 at 8:19 AM, Michael Steinberg <span dir="ltr"><<a href="mailto:michael.steinberg@tu-clausthal.de" target="_blank">michael.steinberg@tu-clausthal.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
there is an interesting (for me) problem with luabind that you might be<br>
able to answer.<br>
<br>
Considering the template:<br>
<br>
template< typename T ><br>
void deduce( T (*)(), ... ) {}<br>
<br>
template< typename T ><br>
void deduce( T f, SomeType g ) {}<br>
<br>
...more overloads...<br>
<br>
and the function:<br>
<br>
void foo() {<br>
   throw some();<br>
}<br>
<br>
deduce( foo );<br>
<br>
clang 3.2 seems to add an implicit attribute "noreturn" (I assume that<br>
is because clang detected the function will never return). This<br>
attribute seems to rule out the given first overload of function<br>
template "deduce", which would otherwise be responsible to match the<br>
given function's signature and consequently fails on the second<br>
overload. Is that legal? Or maybe the mismatch is caused by another reason?<br>
<br>
Kind regards,<br>
Michael<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>