This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32232] [4.1 Regression] ICE in resolve_overloaded_unification
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2007 06:20:13 -0000
- Subject: [Bug c++/32232] [4.1 Regression] ICE in resolve_overloaded_unification
- References: <bug-32232-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from mark at codesourcery dot com 2007-07-12 06:20 -------
Subject: Re: [4.1 Regression] ICE in resolve_overloaded_unification
reichelt at gcc dot gnu dot org wrote:
> template<typename> struct A
> {
> A& operator<<(void (*)(A&));
> };
>
> template<typename T> A<T>& operator<<(A<T>&, const A<T>&);
>
> template<typename T> void foo(A<T>&);
>
> void bar()
> {
> A<int>() << (1, foo<int>);
> }
As I (thought I? meant to?) said in the patch submission mail, I don't
think this is valid. The syntactic form of the expression matters for
deduction purposes, and my reading of the standard is that only a
(generalized) identifier is allowed. (It's not very clear, but I didn't
see anything to suggest that your code was valid.) The version of the
EDG front end I had on hand agreed with me. :-) You could certainly ask
on the core reflector, etc.
The issue about printing "(0, ...)" instead of "(1, ...)" is certainly a
bug, but a different one from this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32232