
17 Jan
2011
17 Jan
'11
4:57 p.m.
Is ist possible to have a class that has a map as member like struct Foo { std::map<string,int> bar; }; and then something like class_<Foo>("Foo") .def("__iter__", iterator<std::map<string,int>()); so that in python an object foo of type Foo can be used like this for i in foo: <do something with the bar iterator i> ? Ralf