-
Notifications
You must be signed in to change notification settings - Fork 1
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
Warning to create namespace swap fails with template classes #39
Comments
Thanks for the report, we will look into it. It s probably a glitch that
templates are not handled correctly.
By the way, it is great you are reporting all those issues!
…On Jun 24, 2017 4:24 AM, "Rud Merriam" ***@***.***> wrote:
Trying to create a simple example for another issue I ran into the
suggestion to create swap functions for a template class. After creating
the namespace swap function it is not recognized and the warning continues.
#include <vector>
#include <utility>
template <typename T>
struct A {
std::vector<T> mValues { };
void swap(A& other) noexcept {
using std::swap;
}
};
template <typename T>
void swap(A<T>& a, A<T>& b) noexcept {
a.swap(b);
}
I let the "quick fix" create both swaps. The namespace swap was generated
as a regular function. I changed it to being a template.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#39>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADScQThoP-FXarLPEnmJ7TnkvhqoF8Ajks5sHHNxgaJpZM4OEMSd>
.
|
I've 9,000 lines of code from a recent project that I'm running through the process. There are a number of the refactoring capabilities I don't understand. Is there more detailed documentation somewhere? I don't see it on the web site, at least. |
Unfortunately, the user guides of the various refactoring plug-ins are spread across various websites:
I hope this helps. |
We've fixed the creation of the namespace level swap function for templates. The quick fix should now make swap a template too and and the required template parameters. |
Trying to create a simple example for another issue I ran into the suggestion to create swap functions for a template class. After creating the namespace swap function it is not recognized and the warning continues.
I let the "quick fix" create both swaps. The namespace swap was generated as a regular function. I changed it to being a template.
The text was updated successfully, but these errors were encountered: