
Hi, I usually use shared_ptrs to const as function parameters, such as boost::shared_ptr<const A>, to explicitly state that this function does not modify the pointee. Now I'm trying to do the same in boost.python: ----- C++ class A {}; void testA(boost::shared_ptr<A> s) {} void testAc(boost::shared_ptr<const A> s) {} void register() { class_("A") def("testA", testA); def("testAc", testAc); } void testCPP() { boost::shared_ptr<A> a(new A()); testA(a); testAc(a); } ----- Python a = A() testA(a) testAc(a) ----- The c++ part compiles and runs just fine, but the python call to testAc() fails with the following error message: ----- testAc(a) ArgumentError: Python argument types in _Map.testAc(A) did not match C++ signature: testAc(class boost::shared_ptr<class Map::A const >) ----- Is there a way to use the automatic conversion from A to const A in boost.python? Malte