c++/8279: REGRESSION: failure to find a matching function in ostream_iterator expansion

Joe Buck jbuck@synopsys.com
Mon Oct 21 09:06:00 GMT 2002


>     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 ...



More information about the Gcc-bugs mailing list