Re: Overloading equality operator for classes

2015-01-29 Thread Ali Çehreli via Digitalmars-d-learn
On 01/29/2015 09:48 AM, rumbu wrote: bool opEquals(Object obj, int value) { //do something to compare them return false; } void main(string[] args) { Object obj; if (obj == 12) {} //ERROR function object.Object.opEquals (Object o) is not callable using argument types (i

Re: Overloading equality operator for classes

2015-01-29 Thread via Digitalmars-d-learn
On Thursday, 29 January 2015 at 17:48:04 UTC, rumbu wrote: bool opEquals(Object obj, int value) { //do something to compare them return false; } void main(string[] args) { Object obj; if (obj == 12) {} //ERROR function object.Object.opEquals (Object o) is not callable using

Overloading equality operator for classes

2015-01-29 Thread rumbu via Digitalmars-d-learn
bool opEquals(Object obj, int value) { //do something to compare them return false; } void main(string[] args) { Object obj; if (obj == 12) {} //ERROR function object.Object.opEquals (Object o) is not callable using argument types (int) } According to paragraph (2) - htt