This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

95. Members added by the implementation

Section: [member.functions] Status: NAD Submitter: AFNOR Opened: 1998-10-07 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [member.functions].

View all issues with NAD status.


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


// 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 ()

Proposed resolution:

Clarify the wording to make the example illegal.


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