In C++, it's natural to require an explicit template argument for templated functions whose template parameters only affect their return type. That doesn't work when wrapping normally with pybind11, which just sees a set of equivalent overloaded functions and blithely selects the first one defined.
The [Num-]Pythonic interface for functions like this would take a dtype argument to select the type returned, and this ticket will provide a helper class that makes that easy to implement.
This is a spin-off from
DM-15500, where this helper code is now almost complete.
I'm calling this gen3-middleware because that's why I'm doing
DM-15500, even though this ticket is a few steps removed from the core gen3 work. TCAMs are welcome to reclassify.