Date
2009-10-15.00:00:00
Message id
2358

Content

Proposed resolution (October, 2009):

  1. Change _N3225_.7.6.4 [dcl.attr.final] paragraph 1 and add a new paragraph, as follows:

  2. The attribute-token final specifies derivation semantics for a class and overriding semantics for a virtual function. It shall appear at most once in each attribute-list and no attribute-argument-clause shall be present. The attribute applies to class definitions and to virtual member functions being declared in a class definition. If the attribute is specified for a class definition, it is equivalent to being specified for each virtual member function of that class, including inherited member functions.

    If some class B is marked final and a class D is derived from B the program is ill-formed.

  3. Change the example in _N3225_.7.6.4 [dcl.attr.final] paragraph 3 as follows:

  4.   struct B1 {
        virtual void f [[ final ]] ();
      };
    
      struct D1 : B1 {
        void f();          // ill-formed
      };
    
      struct [[ final ]] B2 {
      };
    
      struct D2 : B2 {    // ill-formed
      };