[Bug c++/12433] Finds wrong overload of std::operator<<
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 28 15:50: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
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From bangerth at dealii dot org 2003-09-28 14:52 -------
Poiters to functions are not pointers, so a generic
template <typename T> ostream operator << (ostream out, T* t);
does not apply. Thus the conversion to bool is performed.
The thing with converting to true: function addresses can never be zero, which sets
them apart from the value of pointers to data, so the result of the conversion to
bool is already known to be true. That's where the warning comes from.
W.
More information about the Gcc-bugs
mailing list