Opened 7 years ago

#6765 new Feature Requests

boost::mem_fn not entirely compatible with std::mem_fn

Reported by: philipp.moeller@… Owned by: Peter Dimov
Milestone: To Be Determined Component: bind
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:


boost::mem_fn only supports calling member functions through proxies when the proxy type has a matching get_pointer function. This is not necessary for std::mem_fn (20.8.10) as the second or fourth item of INVOKE (20.8.2) should apply in such a case.

A solution would be to change _mfi::dm::call(U const& u, void const*) to simply call (*u).*f_

I couldn't find any documentation why exactly get_pointer is used and don't know which implications this might have, but it would be a nice to have feature (and would also allow mem_fn to work on iterators which are often used as handles).

Change History (0)

Note: See TracTickets for help on using tickets.