16-03-2017, 02:14 PM
C 2012 Directive 4.5: "Identifiers in the same name space with overlapping visibility should be typographically unambiguous"
C++ Rule 2-10-1: "Different identifiers shall be typographically unambiguous."
Does this mean the C++ rule applies even to identifiers in different scopes?
Also, does the C++ rule forbid naming a variables after their class name?
C++ Rule 2-10-1: "Different identifiers shall be typographically unambiguous."
Does this mean the C++ rule applies even to identifiers in different scopes?
Code:
void f1() { int i; }
void f2() { int I; } // 2-10-1 violation due to only differing in case?
Also, does the C++ rule forbid naming a variables after their class name?
Code:
class MyClass { };
MyClass myClass; // 2-10-1 violation?
<t></t>