[C++-sig] .def( bp::self == bp::self ); causes compile problems for Py++ generated wrapper

Arne Grimstrup arne at ras.ucalgary.ca
Mon Sep 22 18:28:32 CEST 2008


On Friday, September 19th, William Ladwig wrote:
>
> If you can change the C++ code, try declaring the operator== argument
 > as a const reference (should probably do this anyhow since you aren't
 > modifying the object):
>
> bool operator==(const MyFrac& b) const {
>        return numerator == b.numerator && denominator == b.denominator;}
>
>
> Hope this helps,
> Bill

Thanks very much, Bill.  Adding the const reference to the argument fixed
the problem.

Regards,

Arne



More information about the Cplusplus-sig mailing list