Boost logo

Boost :

Subject: Re: [boost] Any interest in dynamic dispatching mechanism from "interface" to template functions ?
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2010-07-01 16:37:07


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))


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk