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 libstdc++/52917] [DR 2048] explicitly stated return type in std::mem_fn cannot be compiled


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-09 21:35:07 UTC ---
(In reply to comment #1)
> Or you can do
> 
>   auto y = std::mem_fn((int& (X::*)())&X::get );

Or 

  auto y = std::mem_fn <int&()>(&X::get );

Which should also work with either libstdc++ or libc++


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