(In reply to comment #13)
> Once you know A's T, you have a desired type int (*)(T, T) from which to
> determine which specialization of the template to use.

Hm, I agree that the type could be deduced. I could nevertheless
have sworn that this should be invalid:
..........................
template <typename T> int cmp1(T a, T b);
int (*cmp)(int, int) = cmp1;
...........................
But it compiles in fact.

I had no idea a template name could be implicitly instantiated in this
context. Thanks for educating me!

Best
 W.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/541425

Title:
  [PR44629] internal compiler error in unify

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to