Title
Members added by the implementation
Status
nad
Section
[member.functions]
Submitter
AFNOR

Created on 1998-10-07.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

This is not a defect in the Standard.  The example is already illegal.  See [member.functions] paragraph 2.

Date: 2010-10-21.18:28:33

Proposed resolution:

Clarify the wording to make the example illegal.

Date: 1998-10-07.00:00:00

In 17.3.4.4/2 vs 17.3.4.7/0 there is a hole; an implementation could add virtual members a base class and break user derived classes.

Example:

// implementation code:
struct _Base { // _Base is in the implementer namespace
        virtual void foo ();
};
class vector : _Base // deriving from a class is allowed
{ ... };

// user code:
class vector_checking : public vector 
{
        void foo (); // don't want to override _Base::foo () as the 
                     // user doesn't know about _Base::foo ()
};
History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg228
2010-10-21 18:28:33adminsetmessages: + msg227
1998-10-07 00:00:00admincreate