[C++-sig] wrapping objects which inherit from std::map

Jeremy Kie jeremykie at gmail.com
Wed May 6 19:23:56 CEST 2009


Hi,

I have the following:

class foo : public std::map<std::string, std::string> {
}

BOOST_PYTHON_MODULE(foo_ext)
{
  using namespace boost::python;
  class_<foo, bases<std::map>>("foo");
}

The compiler complains that template arguments 1 and 2 are invalid.  I'm
certain my syntax is the problem.  Can't anyone shed some light and help me
correct my syntax?

Thanks,

Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090506/8cf8d708/attachment.htm>


More information about the Cplusplus-sig mailing list