This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13947] New: ptr_fun doesn't recognise argument
- From: "debian-gcc at lists dot debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2004 13:43:34 -0000
- Subject: [Bug c++/13947] New: ptr_fun doesn't recognise argument
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
[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