Skip to content

fix: avoid returning temporary IterTuple refs#736

Open
ErenAri wants to merge 1 commit intomicrosoft:mainfrom
ErenAri:issue-719-itertuple-fix
Open

fix: avoid returning temporary IterTuple refs#736
ErenAri wants to merge 1 commit intomicrosoft:mainfrom
ErenAri:issue-719-itertuple-fix

Conversation

@ErenAri
Copy link
Copy Markdown

@ErenAri ErenAri commented Apr 5, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 5, 2026 13:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes undefined behavior in seal::util::IterTuple tuple-based constructors by ensuring construction returns a concrete IterTuple value (not a reference to a temporary), and adds regression tests to cover tuple lvalue and moved-tuple construction paths.

Changes:

  • Update IterTuple tuple constructors to return self_type(...) from seal_apply lambdas instead of braced temporaries / rvalue references.
  • Add unit test coverage for constructing IterTuple from a tuple lvalue and from a tuple temporary (moved/rvalue).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
native/src/seal/util/iterator.h Fix tuple-constructor implementation to avoid returning references to temporaries.
native/tests/seal/util/iterator.cpp Add regression tests for tuple lvalue and rvalue construction of IterTuple.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ErenAri
Copy link
Copy Markdown
Author

ErenAri commented Apr 5, 2026

@microsoft-github-policy-service agree

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