From Python to c++

Farshid Lashkari lashkariNO at SPAMworldviz.com
Tue Mar 21 15:03:28 EST 2006


> Any suggestions are very welcome!

Are you allowed to use any boost libraries? If so then boost::any would 
probably help. The boost::any object can contain any object type. So you 
could have a single container that looked like the following:

std::map< std::string, std::vector<boost::any> > result;

Since you know the type, you would use boost::any_cast to convert it to 
that type. You can find information about it here:

http://www.boost.org/doc/html/any.html

-Farshid



More information about the Python-list mailing list