Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: Fri Mar 29 08:59:35 CET 2024

Total time taken to generate the page: 0.01804 seconds