cplusplus / nbballot

Handling of NB comments in response to ballots
14 stars 4 forks source link

US 5-033 6.3 [basic.def.odr] Differences in constant initialization #477

Closed wg21bot closed 1 year ago

wg21bot commented 1 year ago

Variables having constant initialization in one translation unit but not another can introduce differences in lambda capture and issues where dynamic initialization attempts to write to read-only memory associated with a const-qualified variable.

Proposed change:

Address CWG2242 by specifying that cases with the described issues have ODR violations.

jensmaurer commented 1 year ago

CWG 2022-11-11: Approved CWG2242 resolution.

jensmaurer commented 1 year ago

Accepted.