This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19712] New: Can not use pow (as a function), must say std::pow explicitly.
- From: "larsnostdal at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2005 13:50:27 -0000
- Subject: [Bug c++/19712] New: Can not use pow (as a function), must say std::pow explicitly.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
#include <iostream>
#include <cmath>
using namespace std;
double func(double num, double pow)
{
return(pow(num, pow));
}
int main()
{
return(0);
}
error: `pow' cannot be used as a function
If I add std:: before pow, it works:
double func(double num, double pow)
{
return(std::pow(num, pow));
}
--
Summary: Can not use pow (as a function), must say std::pow
explicitly.
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: larsnostdal at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19712