This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37582] New: std::pow strange overload resolution
- From: "jarausch at igpm dot rwth-aachen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Sep 2008 07:31:40 -0000
- Subject: [Bug c++/37582] New: std::pow strange overload resolution
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc is complaining about an ambiguous overloading of operator&&
in the statement (last non-trivial line)
return std::pow(a,2.0);
where no such operator appears. (I haven't seen a macro definition of 'pow'
which pulls in '&&')
If I replace the statement above by
return ::pow(a,2.0);
the error disappears.
The function 'pow' should be injected into namespace 'std'
when doing
#include <cmath>
or am I missing something?
--
Summary: std::pow strange overload resolution
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jarausch at igpm dot rwth-aachen dot de
GCC build triplet: i386
GCC host triplet: i386
GCC target triplet: i386
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37582