Closed mpolacek closed 10 months ago
Why do you think that this grammatical structure can potentially be interpreted as "a && (b || c)"?
Why do you think that this grammatical structure can potentially be interpreted as "a && (b || c)"?
Because without the "or" or "and" it is not clear whether "V is constexpr" is a sufficient or necessary condition.
But we say things like "X, Y, and Z" and "X, Y, or Z" all the time. All native speakers understand these constructs to mean "X and Y and Z" and "X or Y or Z". So why is this part of the standard ambiguous?
But we say things like "X, Y, and Z" and "X, Y, or Z" all the time. All native speakers understand these constructs to mean "X and Y and Z" and "X or Y or Z". So why is this part of the standard ambiguous?
I guess I was confused because here it is immediately followed by "An object or reference is usable in constant expressions if it is" followed by a list where every bullet ends with "or". But, https://github.com/cplusplus/draft/wiki/Specification-Style-Guidelines#lists deems both styles OK so I suppose we can close this issue.
Full name of submitter: Marek Polacek
Reference (section label): [expr.const]/4
Link to reflector thread (if any): N/A
Issue description: We say that V is usable in constant expressions if:
but this is ambiguous; it could be read as either a || b || c or a && (b || c). The former is likely the intended reading.
Suggested resolution: