> It also isn't a solution if the callback needs to accept more than one set of arguments, or an argument type which isn't easily calculated within the signature.
Would it be fixed by Proxy proposal?
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0957r6.pdf
Still we need to pay some for type erasure overhead but calling set is
fully customizabe.
If I understand the Proxy proposal correctly, it would solve the multiple signatures case but not the case where it's difficult or impossible to calculate the callback argument type within the outer signature.
It's a bit difficult to describe, but it can happen in code that's not all that complicated - consider passing to the callback a ranges::transform_view where the transforming function is a lambda.