cppfront
cppfront copied to clipboard
fix: lower (nested) _braced-init-list_ (argument)
Resolves #1283. Resolves #1037. Resolves #568. Resolves #542.
The main branch already treats a return type contextually,
only lowering a braced-init-list if it can work: https://cpp2.godbolt.org/z/sonKE4zan.
This PR recognizes two other places where an expression list can be an initializer to lower as a braced-init-list:
- As a function argument.
- As an expression in the expression list of an initializer (nested braced-init-list).
Commit 94bea673583991d2ff90de96a8c4d7a0d312a2b6 did this for the empty list () (non-nested).
Thanks and sorry for the lag!
This seems like it could be pri-3 (per #1287) if it were rebased to current main. Do you want to rebase this, or should we close this?
Rebased.