[Bug c++/12433] Finds wrong overload of std::operator<<

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Sun Sep 28 16:09:00 GMT 2003


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.



More information about the Gcc-bugs mailing list