[Bug libstdc++/48521] New: [4.5/4.6/4.7 Regression] [C++0x] std::result_of doesn't work with pointer to member

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 8 21:16:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48521

           Summary: [4.5/4.6/4.7 Regression] [C++0x] std::result_of
                    doesn't work with pointer to member
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org


This is supposed to work, and did with 4.4:

#include <functional>
struct X
{
  int foo();
};

typedef int (X::*pm)();
std::result_of<pm()>::type i = 0;

This means we don't accept std::async(X::foo, ...) which is defined in terms of
result_of

I think I intentionally removed support for pointers to members from result_of,
because an earlier C++0x draft said it shouldn't work



More information about the Gcc-bugs mailing list