[C++-sig] boost::python std::vector< std::string > crash

Joel de Guzman joel at boost-consulting.com
Thu Jun 22 16:06:09 CEST 2006

John Reid wrote:
> Hi,
> I'm using boost/python/suite/indexing/vector_indexing_suite.hpp from the 
> cvs_head version of boost python on MSVC 8. I'm getting a runtime 
> assertion failure when appending to a vector of strings.
> There seems to be very little in the documenation about how std::strings 
> are handled. They seem to work fine when used outside containers. Also 
> containers of user-defined classes (as in the vector indexing example, 
> struct X) and containers of doubles, ints, etc.. seem to work fine.
> What am I missing here?

That's odd. I can't reproduce your results. To be sure, I added
your test in libs/python/test/vector_indexing_suite.cpp/py.
I'm getting no crash. Please check out the test suite and run it.

Joel de Guzman

More information about the Cplusplus-sig mailing list