This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8279: REGRESSION: failure to find a matching function in ostream_iterator expansion
- From: Joe Buck <jbuck at synopsys dot com>
- To: paolo at gcc dot gnu dot org
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, Joe dot Buck at synopsys dot COM, nobody at gcc dot gnu dot org
- Date: Mon, 21 Oct 2002 09:06:15 -0700 (PDT)
- Subject: Re: c++/8279: REGRESSION: failure to find a matching function in ostream_iterator expansion
> The testcase doesn't compile with 3.0.4/3.1.1/Icc6 either.
> I'm not a language lawyer but what about putting the
> operator<< inside namespace std:: ??
> The following works for me (and all the compilers above):
The error first appeared in 3.0, so the fact that 3.0.4 and 3.1.1 behave
the same way as 3.2.1-pre is not saying much.
Thanks for the workaround, but it shouldn't be necessary. Also, it's not
consistent, in that it is needed in some circumstances and not in others.
Define HIDE_BUG and notice that the program compiles and runs, without
putting the operator<< in std.
The problem is that there is no explanation as to why the compiler is
ignoring an exact match that is in scope.
Now, if someone can point me to chapter and verse in the ISO standard as
to why this behavior is the right thing ...