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

Fix creation of unnecessary temporary #806

Closed
wants to merge 1 commit into from

Conversation

vr-dada
Copy link

@vr-dada vr-dada commented Apr 4, 2022

A reference to a value type of a std::unordered_map has a const key
within the corresponding pair. Using a std::pair<std::string...
therefore causes the creation of such a pair out of the loop variable.
Clang reports this.

This is a

  • Breaking change
  • New feature
  • Bugfix
  • [ x] Minor code improvement

I have

A reference to a value type of a `std::unordered_map` has a const key
within the corresponding pair. Using a `std::pair<std::string...`
therefore causes the creation of such a pair out of the loop variable.
Clang reports this.
@simoc
Copy link

simoc commented Apr 7, 2022

These changes are already included in #771, that is also waiting to be merged to master.

@vr-dada
Copy link
Author

vr-dada commented Apr 8, 2022

Oh my bad, haven't found this. Thanks for the feedback!

@vr-dada vr-dada closed this Apr 8, 2022
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