cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

fix: lower (nested) _braced-init-list_ (argument)

Open JohelEGP opened this issue 2 years ago • 3 comments

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).

JohelEGP avatar Jan 10 '24 02:01 JohelEGP

Commit 94bea673583991d2ff90de96a8c4d7a0d312a2b6 did this for the empty list () (non-nested).

JohelEGP avatar Sep 22 '24 13:09 JohelEGP

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?

hsutter avatar Sep 25 '24 00:09 hsutter

Rebased.

JohelEGP avatar Oct 04 '24 02:10 JohelEGP