Shouldn't rationalADT be the arguments to the overloaded operator? Didn't bother to read the posts before this, did you?
Type: Posts; User: Sebastiani
Shouldn't rationalADT be the arguments to the overloaded operator? Didn't bother to read the posts before this, did you?
>> and it worries me. Have you never really seen a+b in a program before? For integers, or for floating-point (float or double), or anything?
Me, too. I decided against posting a complete example...
>> Well, does "very rarely" mean that it won't work, or does it mean that I've completely skated around the issue?
It means "you can do it but then why unless you have to?". There are times, like...
>> I just need to know how to add two integers. That's it.
The signature for operators returning temporaries (usu.: +, -, *, etc) is generally going to be:
template < typename Type >...