This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44629] [4.3 Regression] ICE in unify, at cp/pt.c:15155
- From: "bangerth at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Mar 2011 04:27:53 +0000
- Subject: [Bug c++/44629] [4.3 Regression] ICE in unify, at cp/pt.c:15155
- Auto-submitted: auto-generated
- References: <bug-44629-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629
--- Comment #14 from Wolfgang Bangerth <bangerth at gmail dot com> 2011-03-10 04:27:49 UTC ---
(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.