[C++-sig] intrusive pointer comparison in python
dave at boost-consulting.com
Thu Oct 5 16:41:15 CEST 2006
Alex Mohr <amohr at pixar.com> writes:
>> Unfortunately, the class that I'm using isn't comparable, I'm bassically looking for a direct comparison of the held pointers.
> That's what I said. Have it compare the pointers.
> template <typename Ptr>
> static bool are_ptrs_equal(Ptr const &self,
> Ptr const &other)
> return self == other;
> .def("__eq__", are_ptrs_equal<fooHandle>);
isn't this the same as
.def(self == self)
More information about the Cplusplus-sig