TypeError: No to_python (by-value) converter found for C++ type
问题 I'm trying to expose my C++ Classes to Python using Boost.Python. Here is a simplyfied version of what I'm trying to do: struct Base { virtual ~Base() {}; virtual char const *Hello() { printf("Base.Hello\n"); return "Hello. I'm Base."; }; }; struct Derived : Base { char const *Hello() { printf("Derived.Hello\n"); return "Hello. I'm Derived."; }; Base &test() { printf("Derived.test\n"); // ... // After some calculation, we get result reference `instance' // `instance' can be an instance of