Moderators: david ward, misra cpp
- Posts: 20
- Joined: Fri Jul 27, 2007 3:25 pm
does rule 2-10-5 disallows function overloading? What is the definition of "identifier reuse"?
Code: Select all
void foo(C); // Not compliant?
void foo(int, C); // Not compliant?
- Posts: 5
- Joined: Tue Jun 09, 2009 1:43 pm
- Company: The MathWorks
Did you get any answer to this?
Does anybody have an opinion on 2-10-5 and function overloading?
- Posts: 150
- Joined: Mon Jun 02, 2008 1:55 pm
- Company: MISRA
The short answer is No, this rule does not prohibit function overloading. The intent was to prohibit the reuse of identifiers for unrelated objects.
This will be clarified in a Technical Corrigendum
Posted by and on behalf of
the MISRA C++ Working Group