https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102654
Bug ID: 102654 Summary: undefined reference to `std::variant<std::string_view >::variant<std::string_view, void, void, std::string_view, void>(std::string_view&&)' Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- The following code will generate an undefined reference error since gcc-11. I don't know if this is a bug. #include <variant> #include <string_view> struct my_variant : std::variant<std::string_view> { }; int main() { std::string_view s = "hello"; my_variant v{s}; } https://godbolt.org/z/zbjhe1hqE