https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81211
--- Comment #5 from Stephen Kell <srk31 at srcf dot ucam.org> --- I take the point in general, and I see the specific difficulty in how result_of works. In this specific case, there still seems to be a more low-hanging solution. Perhaps having a lambda that is not callable ought to raise a warning? That seems like a more straightforward diagnostic. In particular, by addressing the lambda rather than the std::function, the problem with pointers to member functions doesn't arise. As for the rule of five: a fine reference, but it's rather circular to say what amounts to "don't make mistakes in your code". :-) This error came up after a rather large bout of refactoring that deleted slightly too much stuff....