Talk:Operators in C and C++: Difference between revisions

Content deleted Content added
SineBot (talk | contribs)
m Signing comment by 2.94.232.187 - "Non-reference return types: "
Line 17:
 
[[Special:Contributions/121.210.170.141|121.210.170.141]] ([[User talk:121.210.170.141|talk]]) 06:40, 19 November 2009 (UTC)
 
The prototype column should be corrected, then it would be very usefull. For example, a prototype for an assignment operator that returns a type R!=T, where T is the type of the calling object is a wrong prototype. The build-in assignment operator returns a reference to the left-hand side operator, which has particular effects. Overloaded operators should implement an analogous interface. Therefore, it worths if the column prototypes describe the interface of the build-in operators. Actually, that was the approach of an older version of the page. Why it has changed? Actually, we are allowed to overload an operator with no restriction, eg. we can overload operator= as a void but such an approach would cause confusion to the application programmer who should cope with various behaviors of assignment operation
 
==Describe what they do==