[Bug libstdc++/48521] [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
Mon Apr 18 21:44:00 GMT 2011


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-18 21:43:36 UTC ---
(In reply to comment #0)
> 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;

Bah, that shouldn't work! But this should:

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



More information about the Gcc-bugs mailing list