https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78966
--- Comment #2 from Eelis <gcc-bugzilla at contacts dot eelis.net> --- The testcase was a minimized version of the (imho innocuous looking): #include <variant> #include <iostream> template<typename... T> std::ostream & operator<<(std::ostream &, std::variant<T...> const &); int main() { std::cout << std::endl; } This gives: error: invalid use of incomplete type ‘struct std::variant_alternative<0, std::variant<> >’ I'd be curious to know the rule that makes this ill-formed. Anybody happen to know it, or the number of the DR (if there is one)? In any case, feel free to close the ticket if GCC is really correct here. In that case, sorry for the noise. :)