Jeremy Kie wrote:
Hi,
I have the following:
class foo : public std::map<std::string, std::string> {
}
You lack a semicolon here. (I also don't think it's a good idea to
derive from standard containers, but that is an entirely different subject).
BOOST_PYTHON_MODULE(foo_ext)
{
using namespace boost::python;
class_<foo, bases<std::map>>("foo");
There are three errors here, let's start with the simplest:
You use '>>' in this line, which is a single token. You need to insert a
whitespace there to make it two tokens, e.g. '> >'.
Next, you use 'std::map' where you ought to use a type (such as
'std::map<std::string, std::string>'.
Finally, you only can declare bases that are themselves already exported
to python via class_, so you need to start by exporting the base type
std::map<std::string, std::string> prior to 'foo'.
Hope this helps,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig