Boost.Python call by reference : TypeError: No to_python (by-value) converter found for C++ type: Boost.Python call by reference : TypeError: No to_python (by-value) converter found for C++ type: python python

Boost.Python call by reference : TypeError: No to_python (by-value) converter found for C++ type:


Change B.do_something(a); to B.do_something(boost::ref(a));.

See Calling Python Functions and Methods in the boost manual.