This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Oct 2012 23:12:12 +0000
- Subject: [Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor
- Auto-submitted: auto-generated
- References: <bug-55120-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-29 23:12:12 UTC ---
I think Johannes is right, the virtual base is default-initialized without
needing to look up its name in the scope of D, and the implicitly-defined
default constructor is public so accessible.
Curious that G++, Comeau and Clang all accept the example in CWG issue 7,
despite the rationale (and Mike) indicating it's intended that a virtual
private base can't be derived from.