Program with std::variant works in msvc but not in gcc
I wrote the following program that works with msvc c++17 but rejected by gcc and clang. I want to know which compiler is right here. Demo #include <variant> struct C { std::variant<bool> mem; C(std::variant<bool> p): mem(p) { } }; int main() { C c(1); //works with msvc but not with gcc and clang } GCC… Read More Program with std::variant works in msvc but not in gcc