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

Remove feature introduced in C++20 to avoid hard dependence to C++20 #877

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

erwei-xilinx
Copy link
Collaborator

No description provided.

@erwei-xilinx erwei-xilinx requested a review from fifield as a code owner January 23, 2025 18:49
Comment on lines 966 to 971
auto pushMemrefEntryToVector = []<typename T>(T entry,
SmallVector<T> &vector) {
if (!isa<MemRefType>(entry.first.getType()))
return;
vector.push_back(entry);
};
Copy link
Member

Choose a reason for hiding this comment

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

On the other hand you could just use some C++14 Python-esque code like

 auto pushMemrefEntryToVector = [](auto entry, auto &vector) {
    if (!isa<MemRefType>(entry.first.getType()))
      return;
    vector.push_back(entry);
  };

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That works! Thanks for the comment, @keryell!

@erwei-xilinx erwei-xilinx enabled auto-merge (squash) January 23, 2025 19:55
@erwei-xilinx erwei-xilinx merged commit b114d1f into Xilinx:main Jan 23, 2025
11 checks passed
@erwei-xilinx erwei-xilinx deleted the no_cpp_20 branch January 23, 2025 20:51
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