This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


2246. Access of indirect virtual base class constructors

Section: 11.8.3  [class.access.base]     Status: drafting     Submitter: Vinny Romano     Date: 2016-03-08

Consider this example from issue 7:

  class Foo { };
  class A : virtual private Foo { };
  class Bar : public A { }; 

This example should cause Bar's defaulted default constructor to be deleted, because it does not have access to the injected-class-name Foo.

Notes from the December, 2016 teleconference:

The injected-class-name is irrelevant to the example, which is ill-formed. The access should be permitted only if conversion of the this pointer to a pointer to the base class would succeed.