U++ framework
Do not panic. Ask here before giving up.

Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » overloading operators rules
icon5.gif  overloading operators rules [message #19431] Wed, 03 December 2008 13:31 Go to previous message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
Hi to all.

There are rules for overloading operators in C++ I'm not sure i got them all. I do not ask for a syntax tutor, its meant so "what makes sense".

- keep track of semantics, so that the operator performs it is assumed to do: the op+ should add anything.
- avoid a given overload provided by the lang: "int % int" is here already.

Anyone can tell me some further rules recommended?
Thank you for any reply.

Martin
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Previous Topic: I don't get some aspects of STL ... [pointless rant]
Next Topic: Basic library interface and separation problem
Goto Forum:
  


Current Time: Wed May 06 01:43:41 GMT+2 2026

Total time taken to generate the page: 0.00940 seconds