On Sun, Jun 24, 2012 at 2:57 PM, Richard Smith <[email protected]>wrote:

> Thanks, LGTM.
>
>
> Incidentally, for this example:
>
>
> template<typename ...T> struct S  {};
> template<typename T> using U = S<int, char, T>;
> template<typename T> using V = U<U<T>>;
> int f(S<int, char, U<const double>>);
> int k = f(V<double>());
>
> I get:
>
> <stdin>:4:5: note: candidate function not viable: no known conversion from
> 'S<[2
>      * ...], *struct S<int, char, double>*>' to 'S<[2 * ...], *U<const
>      double>*>' for 1st argument;
>
> where I would have preferred:
>
> <stdin>:4:5: note: candidate function not viable: no known conversion from
> 'S<[2
>      * ...], S<[2 * ...], *double*>>' to 'S<[2 * ...], S<[2 * ...], *const
>      double*>>' for 1st argument;
>
> Any idea what's going on there?
>
>
> 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.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to