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

[Refactor] Replace std::tie with structured bindings #12610

Merged
merged 4 commits into from
Aug 29, 2022

Conversation

Lunderberg
Copy link
Contributor

With C++17 enabled in #12337, using structured bindings to replace cases where std::tie is used to define local variables.

With C++17 enabled in apache#12337, using
structured bindings to replace cases where `std::tie` is used to
define local variables.
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

LGTM

Lunderberg and others added 3 commits August 26, 2022 09:15
This is a bug in gcc version 7, resolved in gcc 8.  While gcc version
7 is used for CI, we'll need to silence unused variable warnings
resulting from using only part of a structured binding.

More information: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81767
@masahi masahi merged commit 3d41ac3 into apache:main Aug 29, 2022
@Lunderberg Lunderberg deleted the std_tie_to_structured_bindings branch August 29, 2022 13:08
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
* [Refactor] Replace std::tie with structured bindings

With C++17 enabled in apache#12337, using
structured bindings to replace cases where `std::tie` is used to
define local variables.

* Added missing header for <optional>

* Silenced unused variable warnings after structured bindings

This is a bug in gcc version 7, resolved in gcc 8.  While gcc version
7 is used for CI, we'll need to silence unused variable warnings
resulting from using only part of a structured binding.

More information: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81767
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.

3 participants