Skip to content

WIP: Support C++26 destructuring expansion statements (IL CHANGE) [GH #216] - #620

Draft
nv-cmeerw wants to merge 2 commits into
mainfrom
fix/216
Draft

nv-cmeerw wants to merge 2 commits into
mainfrom
fix/216

Conversation

@nv-cmeerw

Copy link
Copy Markdown
Contributor

The front end now supports enumerating and destructuring expansion statements
in C++26 mode. For example, with --c++26:

  struct S { int a; short b; };
  constexpr int f() {
    int n = 0;
    template for (auto x : S{1, 2}) {
      n += x;
    }
    return n;
  }
  static_assert(f() == 3);

Expansion statements are also accepted with a warning in GNU C++11 and later
modes emulating GCC 16 or later. Iterating expansion statements are not yet
implemented.

Additionally, diagnostics for incomplete non-tuple-like class types, tuple-like
unions, and arrays of unknown bound or run-time length are now consistent for
structured bindings and destructuring expansion statements.

@nv-cmeerw nv-cmeerw self-assigned this Nov 27, 2026
@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for 2aafae3bb285:

@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for 2aafae3bb285:

CI failure.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants