I am using Boost 1.47 I have these class methods:
void Remove(const std::type_info &type); void Remove(const boost::python::type_info type); I tried wrapping them both in Boost.Python: void (Entity::*Remove1)(const std::type_info&) = &Foo::Remove; void (Entity::*Remove2)(const boost::python::type_info) = & Foo::Remove; class_< Foo , boost::noncopyable, shared_ptr< Foo > >(" Foo", init<>()) ... .def("Remove", Remove1) .def("Remove", Remove2) ... (I just tried type_info of both namespaces to be comprehensive here...) It'll compile and and I'll get that Remove method fine. Except I can't seem to cram something into it when I try to actually execute the subroutine. Say I have class Bar wrapped in Python too, and I have been using it fine and dandy. How do I get Remove() to accept the type of Bar as an argument? Say: foo = Foo() foo.Remove(Bar)... foo.Remove(type(Bar))... I just can't get any love here: Traceback (most recent call last): File "<stdin>", line 1, in <module> Boost.Python.ArgumentError: Python argument types in foo.Remove(Foo, type) did not match C++ signature: Remove(class game::Entity {lvalue}, struct boost::python::type_info) Remove(class game::Entity {lvalue}, class type_info)
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig