I was thinking about more something along these lines. But note the double indirection: we end up passing the smart pointer animal_pointer by reference.
We achieve the "signature thing" though in that we take these animal objects and effectively get them to to conform to the common animal_pointer abstract base without their cooperation.
Moreover, everything here can be done without a concept.
This version of the code builds with g++ -std=c++17. We just get worse diagnostics if we try to use something as a Speaker which doesn't conform.
I was thinking about more something along these lines. But note the double indirection: we end up passing the smart pointer animal_pointer by reference.We achieve the "signature thing" though in that we take these animal objects and effectively get them to to conform to the common animal_pointer abstract base without their cooperation.
animal_api is a regular function, which represents some external API that we don't get to recompile.