P1787: CWG952 is resolved by refining the definition of “naming class” per Richard’s suggestion in “CWG1621 and [class.static/2”.
Wording:
- [class.static]/2 removed;
- [class.access.base]/5 rephrased.
Currently behavior is the following: unqualified names undergo unqualified name lookup [1], which perform unqualified search in immediate scope [2]. This scope is the scope the definition of naming class [3] refers to. A::I is not accessible when named in classes C and D per [3]. In particular, the last item regarding base class ([class.access.base]/5.4) is not applicable, because class A is not accessible in both classes C and D per [4].
References:
I wouldn't mind another test case:
this was something Richard had pointed out needs to still work as part of the reflector discussions of this issue.