This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78966] Unjustified variadic template instantiation
- From: "gcc-bugzilla at contacts dot eelis.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Jan 2017 11:55:17 +0000
- Subject: [Bug c++/78966] Unjustified variadic template instantiation
- Auto-submitted: auto-generated
- References: <bug-78966-4@http.gcc.gnu.org/bugzilla/>
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. :)