SWIG and Boost::variant
问题 I'm in the middle of trying to wrap a c++ project into a python api using SWIG and I'm running into an issue with code that has the following format. class A { //constructors and such. }; class B { //constructors and such. }; class C { //constructors and such. }; typedef boost::variant<A,B,C> VariantType; typedef std::vector<boost::variant<A,B,C>> VariantTypeList; Classes A,B & C all come out in the python wrapper without a problem and seem to be usable. However when I try to add the