<div style="font-family: arial, helvetica, sans-serif"><font size="2"><div class="gmail_quote">On Mon, Jun 25, 2012 at 2:09 PM, Richard Trieu <span dir="ltr"><<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif"><font size="2"><div class="gmail_quote"><div class="im">On Sun, Jun 24, 2012 at 2:57 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, LGTM.<br><br><br>Incidentally, for this example:<div><br><br>template<typename ...T> struct S {};<br>
template<typename T> using U = S<int, char, T>;<br></div>template<typename T> using V = U<U<T>>;<br>
int f(S<int, char, U<const double>>);<br>int k = f(V<double>());<br><br>I get:<br><br><stdin>:4:5: note: candidate function not viable: no known conversion from 'S<[2<br> * ...], <b>struct S<int, char, double></b>>' to 'S<[2 * ...], <b>U<const<br>
double></b>>' for 1st argument;<br><br>where I would have preferred:<br><br><stdin>:4:5: note: candidate function not viable: no known conversion from 'S<[2<br> * ...], S<[2 * ...], <b>double</b>>>' to 'S<[2 * ...], S<[2 * ...], <b>const<br>
double</b>>>' for 1st argument;<br><br>Any idea what's going on there?<div><div><br><br></div></div></blockquote></div><div>Looking into it. It looks like Clang has 'struct S<int, char, double>' as a SubstTemplateTypeParmType instead of a TemplateSpecializationType, causing the template diffing to handle it as a type without going deeper. </div>
</div></font></div>
</blockquote></div><br><div>Fixed.</div></font></div>