[Bug c++/13947] New: ptr_fun doesn't recognise argument
debian-gcc at lists dot debian dot org
gcc-bugzilla@gcc.gnu.org
Sat Jan 31 13:43:00 GMT 2004
[forwarded from http://bugs.debian.org/222497]
diagnostic seen with g++-3.[234], not with g++-2.95
The program below doesn't compile. If you change "isalnum" in ptr_fun
to "isal", it compiles just fine, though.
-- CUT HERE --
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
using namespace std;
int isal(int c)
{
return isalnum(c);
}
int main(int argc, char **argv)
{
string component(argv[1]);
if (find_if(component.begin(), component.end(),
ptr_fun(isalnum)) != component.end()) {
cerr << "Error\n";
return -1;
}
}
-- CUT HERE --
--
Summary: ptr_fun doesn't recognise argument
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: debian-gcc at lists dot debian dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13947
More information about the Gcc-bugs
mailing list