Created on 2026-08-30.00:00:00 last changed yesterday
Proposed resolution (approved by CWG 2026-09-01):
Change in 9.5.1 [dcl.init.general] bullet 15.4 as follows:
- ...
- If the initializer is
()of the form ( expression-listopt ) and the expression-list is absent (after any pack expansion (13.7.4 [temp.variadic])), the object is value-initialized. [ Note: ... ]- ...
Change in 9.5.2 [dcl.init.aggr] paragraph 11 as follows:
... An array of unknown bound shall not be initialized withan emptya braced-init-list{}that has no elements. [ Footnote: ... ] ...
(From submission #998.)
Consider:
void foo(auto...x) {
int y[]{x...};
}
void bar(auto...z) {
int w(z...);
}
int main(){
foo();
bar();
}
The rules around empty initializers are syntax-based and do not appear to address situations involving empty packs.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-09-03 23:06:47 | admin | set | status: open -> tentatively ready |
| 2026-08-30 20:20:05 | admin | set | messages: + msg8672 |
| 2026-08-30 00:00:00 | admin | create | |