This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Voted into WP at the October, 2006 meeting.]
When the Standard refers to a virtual base class, it should be understood to include base classes of virtual bases. However, the Standard doesn't actually say this anywhere, so when 7.3.13 [conv.mem] (for example) forbids casting to a derived class member pointer from a virtual base class member pointer, it could be read as meaning:
struct B {}; struct D : public B {}; struct D2 : virtual public D {}; int B::*p; int D::*q; void f() { static_cast<int D2::*>(p); // permitted static_cast<int D2::*>(q); // forbidden }
Proposed resolution (October, 2005):
Change 7.3.13 [conv.mem] paragraph 2 as indicated:
...If B is an inaccessible (11.8 [class.access]), ambiguous (6.5.2 [class.member.lookup]) or virtual (11.7.2 [class.mi]) base class of D, or a base class of a virtual base class of D, a program that necessitates this conversion is ill-formed...
Change 7.6.1.9 [expr.static.cast] paragraph 2 as indicated:
...and B isnotneither a virtual base class of D nor a base class of a virtual base class of D...
Change 7.6.1.9 [expr.static.cast] paragraph 9 as indicated:
...and B isnotneither a virtual base class of D nor a base class of a virtual base class of D...