On Tue, 4 Oct 2022, 23:18 Jonathan Wakely, <cxx@kayari.org> wrote:

Yes, we'd all like ponies :-)

Yes, and this is effectively what I'm getting at. There is a large list of requirements that people can have on an erasure abstraction, and that variations on std::function which offer a subset of these will inevitably leave some uses cases out. 

That is not to say that such an abstraction cannot exist (naios/Function2 has a function_base which comes close) and there are libraries that target runtime polymorphism more generally (e.g dyno) but standardisation of these would be a much larger effort and will inevitably lead to problems as more customisation points are discovered. 

Which is why I'm inclined to agree with Arthur that people should just write their own erasure abstractions (and if possible, the standard should try to offer tools to make this easier) rather than standardising things like inplace_function and any_invocable.