Tim Song wrote:
On Mon, Apr 10, 2017 at 2:48 PM, Peter Dimov via Boost
wrote: The obvious theoretically consistent approach here is
void(foo::*)(float, char, int) -> tuple
It depends on what the theory is.
What I wanted (and failed) to express by "theoretically consistent" wasn't "consistent with a theory" but "consistent, in theory". That is, consistent, but not necessarily a better choice in practice.
If the model is "type of the implicit object parameter during overload resolution", then foo& is the correct choice (see [over.match.funcs]/4).
That would be useful if you want to perform overload resolution on the
tuple, which you probably don't.
I acknowledged that foo& is more useful. One example is when given a member
pointer pmf you want for some reason to derive its corresponding
std::function. That would be
function< apply_return_t