Title
Diagnosing violations of [[final]]
Status
cd2
Section
_N3225_.7.6.4 [dcl.attr.final]
Submitter
UK

Created on 2009-03-03.00:00:00 last changed 171 months ago

Messages

Date: 2009-07-15.00:00:00

[Voted into WP at July, 2009 meeting.]

Date: 2009-03-15.00:00:00

Proposed resolution (March, 2009):

Change _N3225_.7.6.4 [dcl.attr.final] paragraph 2 as follows:

If a virtual member function f in some class B is marked final and in a class D derived from B a function D::f overrides B::f, the program is ill-formed; no diagnostic required. [Footnote: If an implementation does not emit a diagnostic it should execute the program as if final were not present. —end footnote]
Date: 2009-03-15.00:00:00

Notes from the March, 2009 meeting:

This specification was a deliberate decision on the part of the EWG; the general rule was that it should be possible to ignore attributes without changing the meaning of a program. However, the consensus of the CWG was that violation of the [[final]] attribute should require a diagnostic.

Date: 2011-04-10.00:00:00
N2800 comment UK 108

According to _N3225_.7.6.4 [dcl.attr.final] paragraph 2, overriding a virtual function with the [[final]] attribute renders a program ill-formed, but no diagnostic is required. This is easily diagnosable and a diagnostic should be required in this case.

History
Date User Action Args
2010-03-29 00:00:00adminsetstatus: wp -> cd2
2009-11-08 00:00:00adminsetstatus: dr -> wp
2009-08-03 00:00:00adminsetmessages: + msg2258
2009-08-03 00:00:00adminsetstatus: ready -> dr
2009-03-23 00:00:00adminsetmessages: + msg1890
2009-03-23 00:00:00adminsetmessages: + msg1889
2009-03-03 00:00:00admincreate