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++/24803] [c++0x] reference_wrapper and pointers to member functions



------- Comment #16 from jwakely dot gcc at gmail dot com  2009-07-01 12:18 -------
(In reply to comment #9)
> 
> In the current draft, reference_wrapper invocation requires Callable, which
> means it should not work for pointers to members. The same is true of
> result_of, which determines the result of an expression that isn't valid syntax
> for pointers to members.

Could Howard or Doug comment on this?  the Callable concept and result_of both
determine the result of an expression  fn(args...)  which in invalid if fn is a
pointer to member.

If that's correct, this bug could be closed as INVALID, but that would mean
std::bind and std::reference_wrapper do not support features that work with the
equivalent components in TR1.  It also means that std::bind<R>() works with
pointers to members, even though std::bind() doesn't, because the former
doesn't rely on Callable and is only defined in terms of INVOKE which does
support pointers to members.


I'm trying to figure out if I need to continue to support this behaviour, or if
I can simplify result_of by ignoring pointers to members, but I think this
should be an LWG issue.


-- 


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


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