Created on 2026-06-11.00:00:00 last changed 6 days ago
Suggested resolution:
Change in 9.5.1 [dcl.init.general] bullet 16.3 as follows:
The semantics of initializers are as follows. The destination type is the cv-unqualified type of the object or reference being initialized and the source type is the type of the initializer expression. If the initializer is not a single (possibly parenthesized) expression, the source type is not defined.
- ...
- If the destination type is an array of
charactersordinary character type or of character type (6.9.2 [basic.fundamental]), an array of char8_t, an array of char16_t, an array of char32_t, or an array of wchar_t,and the initializer is a string-literal, see 9.5.3 [dcl.init.string].- ...
Change in 9.5.5 [dcl.init.list] bullet 3.3 as follows:
List-initialization of an object or reference of type cv T is defined as follows:
- ...
- Otherwise, if T is
a character arrayan array of ordinary character type or of character type (6.9.2 [basic.fundamental]) and the initializer list has a single element that is an appropriately-typed string-literal (9.5.3 [dcl.init.string]), initialization is performed as described in that subclause.- ...
(From submission #921.)
Subclause 9.5.3 [dcl.init.string] paragraph 1 clearly includes signed char and unsigned char in the list of array element types that can be initialized by a string-literal. However, 9.5.1 [dcl.init.general] bullet 16.3 does not.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-06-25 18:18:29 | admin | set | messages: + msg8610 |
| 2026-06-11 00:00:00 | admin | create | |