Title
Constant expressions of type void
Status
open
Section
7.7 [expr.const]
Submitter
Lénárd Szolnoki

Created on 2025-11-23.00:00:00 last changed 2 weeks ago

Messages

Date: 2025-11-30.20:37:57

Possible resolution:

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

A constant expression is either
  • a glvalue core constant expression E for which ...
  • a prvalue core constant expression whose result object (7.2.1 [basic.lval]) (if any) satisfies the following constraints: ...

Drafting note: A prvalue of object type always has a result object; see 7.2.1 [basic.lval] paragraph 5.

Date: 2025-11-23.00:00:00

(From submission #821.)

Subclause 7.7 [expr.const] bullet 22.2 does not handle expressions of type void or of scalar types.

History
Date User Action Args
2025-11-29 09:10:58adminsetmessages: + msg8421
2025-11-23 00:00:00admincreate