Title
Multiple definitions of non-odr-used entities
Status
drafting
Section
6.3 [basic.def.odr]
Submitter
Hubert Tong

Created on 2021-07-02.00:00:00 last changed 1 week ago

Messages

Date: 2021-08-15.00:00:00

Notes from the August, 2021 teleconference:

CWG observed that there is a similar problem in paragraph 13. See also issue 1849.

Date: 2021-07-02.00:00:00

According to 6.3 [basic.def.odr] paragraph 10,

Every program shall contain exactly one definition of every non-inline function or variable that is odr-used in that program outside of a discarded statement (8.5.2 [stmt.if]); no diagnostic required.

This wording could be interpreted as allowing multiple definitions of non-inline variables and functions if they are not odr-used. That is presumably not the intent.

History
Date User Action Args
2021-11-15 00:00:00adminsetmessages: + msg6535
2021-07-02 00:00:00admincreate