Symbol opBinary(string op : "/")(const Integer z) const { return new RationalNumber(this, z); } Getting:Error: class `rational_number.RationalNumber` member `this` is not accessible Error: template instance `integer.Integer.opBinary!"/"` error instantiating
`This` reference not accessible when overloading an operator?
Enjoys Math via Digitalmars-d-learn Tue, 21 Jan 2020 12:51:11 -0800
I have an Integer class in integer.d. A RationalNumber class in
rational_number.d, and they each import each other (so that could
be the issue). However, this is not working:
- `This` reference not accessib... Enjoys Math via Digitalmars-d-learn
- Re: `This` reference not... Steven Schveighoffer via Digitalmars-d-learn
- Re: `This` reference not... Mathias Lang via Digitalmars-d-learn