Title
Constant evaluation of non-defining variable declarations
Status
drwp
Section
7.7 [expr.const]
Submitter
Hubert Tong

Created on 2022-03-21.00:00:00 last changed 11 months ago

Messages

Date: 2023-06-15.09:07:48

Proposed resolution (approved by CWG 2023-06-15):

  1. Change in 7.7 [expr.const] bullet 5.2 as follows:

Date: 2023-06-15.00:00:00

[Accepted as a DR at the June, 2023 meeting.]

Paper P2242 (Non-literal variables (and labels and gotos) in constexpr functions) added 7.7 [expr.const] bullet 5.2:

  • a control flow that passes through a declaration of a variable with static (6.7.5.2 [basic.stc.static]) or thread (6.7.5.3 [basic.stc.thread]) storage duration;

It seems that block-scope extern (i.e. non-defining) declarations are covered by the above bullet, but only definitions should be in view here.

History
Date User Action Args
2023-12-19 10:15:28adminsetstatus: dr -> drwp
2023-07-16 13:00:43adminsetstatus: ready -> dr
2023-06-15 09:07:48adminsetstatus: open -> ready
2022-03-21 00:00:00admincreate
2022-02-18 07:47:23adminsetmessages: + msg6768