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 14:52:34 -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
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.