https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120
Anthony Sharp <anthonysharp15 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anthonysharp15 at gmail dot com
--- Comment #8 from Anthony Sharp <anthonysharp15 at gmail dot com> ---
This issue was mentioned in pr17314 and Jason got verification from the C++
standards committee that it was expected behaviour that inaccessible virtual
constructors (or whatever one calls it - I'm not too clued up on the lingo)
should not work (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17314).
As Jason says, a class with a virtual private base can't be derived from
(http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#7).
In fact, it seems that it is even the case that a public virtual base can't be
derived from (see pr17314 discussion - especially comment 17).
The latest version of the Visual Studio compiler gives the following warnings
when you attempt to derive from a private OR a public virtual base:
warning C4594: class 'cclass' can never be instantiated - indirect virtual base
class 'aclass' is inaccessible
message : 'aclass' is a private base class of 'bclass'
warning C4624: 'cclass': destructor was implicitly defined as deleted
GCC should generate a warning for this.