This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/78966] Unjustified variadic template instantiation


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. :)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]