
David Abrahams <dave <at> boostpro.com> writes:
Does this make sense as a Boost.Python extension?
The idea is to make things in the opposite way :) A similar mechanism is already implemented in Boost.Python (the "implicit conversion" and the registration of manual convertors + matching of arguments with the function signatures). The mechanism in Boost.Python is relying on a global registry constructed when the python extension are loaded. In what I proposed, this "registry" is given by the set of convertors available at compilation time. These convertors are in a sense similar to the "manual convertors" in boost.python. PS.: I refer to manual convertors as the structures declaring a special kind of conversion from python to C++ (with the two stages conversion static void* convertible(PyObject* obj_ptr) + static XXX* do_convert(PyObject* obj_ptr, void * pos))