Created on 2014-12-20.00:00:00 last changed 106 months ago
Proposed resolution (September, 2015):
Change _N4868_.6.4.1 [basic.scope.declarative] paragraph 4 as follows:
Given a set of declarations in a single declarative region, each of which specifies the same unqualified name,
they shall all refer to the same entity, or all refer to functions and function templates; or
exactly one declaration shall declare a class name or enumeration name that is not a typedef name and the other declarations shall all refer to the same variable, non-static data member, or enumerator, or all refer to functions and function templates; in this case the class name or enumeration name is hidden (_N4868_.6.4.10 [basic.scope.hiding]). [Note: A namespace name or a class template name must be unique in its declarative region (9.9.3 [namespace.alias], Clause 13 [temp]). —end note]
[Adopted at the February, 2016 meeting.]
The type/nontype hiding rules (“struct stat hack”) do not apply in class scope. This is a C compatibility issue:
  struct A {
    struct B { int x; } b;
    int B;    // Permitted in C
  };
Since the type/nontype hiding rules exist for C compatibility, should this example be supported?
| History | |||
|---|---|---|---|
| Date | User | Action | Args | 
| 2017-02-06 00:00:00 | admin | set | status: tentatively ready -> cd4 | 
| 2015-11-10 00:00:00 | admin | set | messages: + msg5589 | 
| 2015-11-10 00:00:00 | admin | set | status: drafting -> tentatively ready | 
| 2014-12-20 00:00:00 | admin | create | |