Sept. 7, 2006
4:55 p.m.
The non-obvious part of this for me is:
- Does this mean that I now need to explicitly wrap (expose using bp::class_ ) all the ref_ptr<> types?
I haven't had to do that thus far because it was handled internally somehow because I used it has the held_type for all my classes. If I expose them manually do I run the risk of breaking any of the held_type functionality?
I'm not sure what you mean... If ref_ptr<T> is the held type for T, then just provide __eq__ in terms of ref_ptr<T>... template <class T> static bool ref_ptr_eq(ref_ptr<T> const &self, ref_ptr<T> const &other) { return self == other; } class_<T, ... ref_ptr<T> ... >(...) .def("__eq__", ref_ptr_eq<T>) ; Am I misunderstanding your situation? Alex