[C++-sig] boost::* standard python conversions

Nicodemus nicodemus at esss.com.br
Sat Feb 12 00:55:16 CET 2005

Preston A. Elder wrote:

>Hope the above helps others, and I hope to hear about other's efforts in
>converting boost::* (or other standard stuff such as std::*, or libc

Hmm, I find this very interesting! At work I have exposed std::vector, 
std::map, std::pair (instantiated with various types, obviously). The 
beauty about exporting template classes is that you can make a function 
that exports any instantiation:

template<class T>
void export_std_vector(const char* name)
    // export std::vector<T>

Then boost::python could automatically export vectors of builtin types, 
plus provide the user with this "export" functions to allow them to 
export vector of custom types.

I think that if this kind of thing was avaiable in boost::python 
out-of-box it would be very handy (like boost::python::numeric). I would 
of course be willing to contribute to some code. :)

What others think?


More information about the Cplusplus-sig mailing list