[Bug c++/71834] [5/6/7 Regression] accepts invalid C++11 code with too few number of template arguments for class template
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 11 10:18:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71834
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.9.3
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Older versions rejected it for different reasons:
g++4.8.5 -std=c++11 v.cc
v.cc:3:42: error: parameter pack ‘<anonymous>’ must be at the end of the
template parameter list
template < Ts ..., typename U > struct B {};
^
v.cc:7:1: error: ‘B’ in ‘struct A<int>’ does not name a type
A < int >::B < 0 > e;
^
g++-4.9.3 -std=c++11 v.cc
v.cc:7:21: error: invalid type in declaration before ‘;’ token
A < int >::B < 0 > e;
^
Neither of those is a very useful diagnostic.
More information about the Gcc-bugs
mailing list