This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]