Created on 2023-11-06.00:00:00 last changed 3 weeks ago
Proposed resolution (approved by CWG 2023-11-07):
Change in 9.4.1 [dcl.init.general] bullet 16.5 as follows:
Otherwise, if the destination type is an array, the object is initialized as follows. Let x1 , . . . , xk be the elements of the expression-list. If the destination type is an array of unknown bound, it is defined as having k elements. Let n denote the array size after this potential adjustment. If k is greater than n, the program is ill-formed. Otherwise, ...
std::string arr = "some string";
Prior to the application of paper P0960R3 (Allow initializing aggregates from a parenthesized list of values), this was ill-formed, but now it is well-formed. However, the specification talks about an expression-list as part of the initializer, which does not exist in this case.
|2023-11-08 05:03:56||admin||set||messages: + msg7499|
|2023-11-08 05:03:56||admin||set||status: open -> review|