So, the gist of what I want to do is this:
More or less I’m trying to allow client code to write a default implementation of the function in A and make it be callable in B. Of course B::new_b() could receive a function as a parameter so the client could write a closure, but I don’t find it ergonomic (but if there is no other alternative, so be it).
Any alternative way of solving this is welcome.
But maybe I’ve been reading too much Modern C++ Design when no one is looking…