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

Rule:  INT#012Checked automatically with code checker

This rule is Obsolete
Synopsis:Avoid multiple definition of overloaded methods/functions in conjunction with the instantiation of a class template
Severity Level:4
Category:Class Interface


If a method/function is overloaded, there may be a conflict if the element type appears explicitly in one of these. After instantiation, there may be two methods/functions that, for example, have the type int as an argument. This is shown in the following code:

template <class ET>
class Conflict
    void foo( int a );
    void foo( ET a ); // What if ET is an int?

In cases where there is a risk for multiple definition of methods or functions, this must be carefully documented.

Literature References:
Ellemtel Rec. 40