Bug 13947 - ptr_fun doesn't recognise argument
Summary: ptr_fun doesn't recognise argument
Status: RESOLVED DUPLICATE of bug 5458
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-31 13:43 UTC by Debian GCC Maintainers
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2004-01-31 13:43:31 UTC
[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 --
Comment 1 Andrew Pinski 2004-01-31 19:08:50 UTC
This is a dup of bug 5458.  (even though their testcases are different, I can reduce it to the same 
problem).

*** This bug has been marked as a duplicate of 5458 ***