TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  OOP#003

Synopsis:A public method must never return a non-const reference or pointer to data outside an object, unless the object shares the data with other objects
Language:C++
Severity Level:2
Category:Object Oriented Programming


Description:

Although, the data exists outside the object it is still part of the state of the object. The calling method should not be able to manipulate this data.



Literature References:
Ellemtel Rule 30