Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 2-10-5 and function overloading
#1
Hello,

does rule 2-10-5 disallows function overloading? What is the definition of "identifier reuse"?
For example:
Code:
class C{};
void foo(int);
void foo(C);      // Not compliant?
void foo(int, C); // Not compliant?
Reply
#2
Hello,

Did you get any answer to this?
Does anybody have an opinion on 2-10-5 and function overloading?

thank you.
<t></t>
Reply
#3
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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)