Closed NiklasRosenstein closed 7 years ago
Hi, I get this warning also on appveyor.
I'm not sure what it's about, but I might look into it soon. I generally develop on gcc and clang, I didn't put much effort into msvc warnings so far.
There's some template partial specialization going on here that also involves parameter packs and non-type template parameters, it might that if I make it a little less tricky then MSVC won't complain. There was something else I wanted to tweak about how the default constructor is declared anyways -- it's not clear to me if MSVC is complaining about the initializer
itself or some particular instantiation of it.
Hi, I made a few minor fixups and twiddled the "intiializer" class so that it doesn't use default template parameters. It looks like it's fixed on appveyor, but please check current master please and let me know if it's fixed for you also.
I'm getting a different warning on appveyor now:
C:\projects\strict_variant\include\strict_variant/recursive_wrapper.hpp(82): warning C4521: 'strict_variant::recursive_wrapper<std::string>': multiple copy constructors specified
I'm going to take a look at that shortly.
@NiklasRosenstein : According to what I read online, the multiple copy constructors
warning is just informational and doesn't indicate a bug. http://stackoverflow.com/questions/24264191/compiler-warning-for-multiple-copy-constructors
I went through the appveyor log in more detail, as far as I can tell the other warnings are similar, or, represent warnings about implicit conversions in the test code. Let me know if you see any warnings that you think are a problem.
In just this simple test, I no longer get any warning, even with /W4
.
#include <strict_variant/variant.hpp>
#include <iostream>
#include <string>
int main() {
strict_variant::variant<int, std::string> val = "foo";
std::cout << *val.get<std::string>() << "\n";
return 0;
}
Good job :)
Hi! I'm getting this warning with MSVC 2015 (19.00.23918)
I'm not sure how to fix it, otherwise I'd make a PR 😊