David Morrison wrote:
Peter Dimov wrote:
Change this to boost::mem_fn( f )( a1, a2, a3 ) and you'll be there.
Yep, that's much cleaner, thanks.
I was hoping that there'd be some clever way to use type_traits to magically select the right way of invoking the function f. That way, one could have a (possibly enhanced version of?) apply.hpp so that code to invoke apply on a set of member and non-member functions would look the same.
On a reasonably conforming compiler, adding an overload to apply<> should
work:
template