[C++-sig] Bug with custom convertor and stl container?

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Sat Jun 17 01:48:18 CEST 2006

--- Will Lee <lee.will at gmail.com> wrote:

> It seems like there's a bug when I use a custom converter (as described in
> the FAQ for the custom string) and a wrapped stl container.  If I define a
> custom converter and use that type in a std::vector or std::map, I'll get an
> "TypeError: No Python class registered for C++" error for that converted
> type.
> For example, in the following case where I'm converting from type A to a
> python integer, std::vector<A> and std::map<int, A> are not working
> propertly.  The testMap and testVec unit tests will both fail.  This is
> somewhat a showstopper so it would be great if you have any idea on how to
> get around this.

You probably have to tell the vector_indexing_suite and the map_indexing_suite
to also return the result of getitem by value. I don't know how to do this but
I believe it is possible.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Cplusplus-sig mailing list