Ambiguous calls
-
I have a class having overloaded friend operators
//.H class FpDate { friend bool operator < (const FpDate & fpDate1,const FpDate & fpDate2 ); friend bool operator <= (const FpDate & fpDate1,const FpDate & fpDate2 ); friend bool operator == (const FpDate & fpDate1,const FpDate & fpDate2 ); }; //.CPP bool operator <= (const FpDate & fpDate1,const FpDate & fpDate2 ) { return ( (fpDate1 < fpDate2) || (fpDate1 == fpDate2) ); }
It is ginving compilation error for both < and == operator call in <= body(above) What can be the problem? Thank You -
I have a class having overloaded friend operators
//.H class FpDate { friend bool operator < (const FpDate & fpDate1,const FpDate & fpDate2 ); friend bool operator <= (const FpDate & fpDate1,const FpDate & fpDate2 ); friend bool operator == (const FpDate & fpDate1,const FpDate & fpDate2 ); }; //.CPP bool operator <= (const FpDate & fpDate1,const FpDate & fpDate2 ) { return ( (fpDate1 < fpDate2) || (fpDate1 == fpDate2) ); }
It is ginving compilation error for both < and == operator call in <= body(above) What can be the problem? Thank YouCould you please show us a sample of where you are calling those operators? Best regards, Alexandru Savescu P.S. Interested in art? Visit this!
-
Could you please show us a sample of where you are calling those operators? Best regards, Alexandru Savescu P.S. Interested in art? Visit this!
One call is there in the <= operator. Other is
//////////// const FpDate& rFpDateOperand1 = (GetDateEvaluationValue(uliRecordNumber, ComparisonExpression::OPERAND_LEFT_SIDE,0)); const FpDate& rFpDateOperand2 = (GetDateEvaluationValue(uliRecordNumber, ComparisonExpression::OPERAND_RIGHT_SIDE,0)); return (rFpDateOperand1 > rFpDateOperand2); /////////
Thank You