Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AK: Array and Tuple structured bindings #24993

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nrdmn
Copy link

@nrdmn nrdmn commented Sep 3, 2024

This PR allows Array and Tuple to be used in structured binding declarations.

This is a new copy of #24986 because apparently I can't re-open closed PRs.

@BuggieBot
Copy link
Member

Hello!

One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Sep 3, 2024
This ensures that the result of calling get() on a temporary Tuple
cannot be assigned to a lvalue reference.
@DanShaders
Copy link
Contributor

Welcome to the project!

Do you have a use-case for these changes? We generally don't add library features for the case of adding features. Also note that the consensus is (or, at least, was) to prefer dedicated structures over tuples for situations that might require convenient unpacking. See a relatively recent discussion on Discord around this message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 pr-needs-review PR needs review from a maintainer or community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants