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: 16.4.6.5 [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.

Discussion:

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 ()
>     };

Proposed resolution:

Clarify the wording to make the example illegal.

Rationale:

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