We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
modernize-use-emplace
#include <map> #include <utility> void f() { std::map<int, int> m; m.insert(std::make_pair(0, 0)); m.insert(std::pair<int, int>(0, 0)); m.emplace(std::pair<int, int>(0, 0)); m.emplace(std::make_pair(0, 0)); }
<source>:11:15: warning: unnecessary temporary object created while calling emplace [modernize-use-emplace] 11 | m.emplace(std::make_pair(0, 0)); | ^~~~~~~~~~~~~~~ ~
https://godbolt.org/z/8MhYPv9qP
The text was updated successfully, but these errors were encountered:
@llvm/issue-subscribers-clang-tidy
Author: Oliver Stöneberg (firewave)
void f() { std::map<int, int> m; m.insert(std::make_pair(0, 0)); m.insert(std::pair<int, int>(0, 0)); m.emplace(std::pair<int, int>(0, 0));
m.emplace(std::make_pair(0, 0));
}
https://godbolt.org/z/8MhYPv9qP </details>
Sorry, something went wrong.
github-actions
No branches or pull requests
https://godbolt.org/z/8MhYPv9qP
The text was updated successfully, but these errors were encountered: