This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13947] New: ptr_fun doesn't recognise argument


[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]