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

Rule:  INT#021Checked automatically with code checker

Synopsis:Pass arguments of class types by reference or pointer if the class is meant as a public base class
Severity Level:9
Category:Class Interface


What is meant is that the function should be able to use the class interface of the passed object, which may actually be of a derived type, in a polymorphic way. This is not possible if the object is passed by value.

Note that such passing by value is not even possible if the argument refers to an abstract class.