This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12433] Finds wrong overload of std::operator<<
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Sep 2003 15:50:29 -0000
- Subject: [Bug c++/12433] Finds wrong overload of std::operator<<
- References: <20030927205755.12433.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12433
------- Additional Comments From bangerth at dealii dot org 2003-09-28 15:50 -------
I stand corrected -- I was under the impression that this shouldn't compile:
-----------------------
template <typename T> void f(T*);
int g();
int main () { f(&g); }
------------------------
Alas, it does indeed.
Looking for the real reason then: I can't find the templated pointer output operator<< you
mention (and I even had in my last mail). Can you point me to the part of the standard
that says it should be there? I though it should be in 27.6.2, but can't see it there...
FWIW, if I compile your code with icc, I get exactly the same output as with gcc.
W.