https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20906
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|excessive diagnostic |[C++98/C++11/c++14 only]
|messages for missing |excessive diagnostic
|template arguments |messages for missing
| |template arguments
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, using -std=c++17 (the default now) and -std=c++20 we get:
<source>:4:34: error: class template placeholder 'bar' not permitted in this
context
4 | template<int k> void foo<k>::pop(bar&, int) {}
| ^~~
<source>:4:34: note: use 'auto' for an abbreviated function template
<source>:4:22: error: no declaration matches 'void foo<i>::pop(...)'
4 | template<int k> void foo<k>::pop(bar&, int) {}
| ^~~~~~
<source>:3:35: note: candidate is: 'void foo<i>::pop(bar<i>&, int)'
3 | template<int i> struct foo { void pop(bar<i>& b, int j); };
| ^~~
<source>:3:24: note: 'struct foo<i>' defined here
3 | template<int i> struct foo { void pop(bar<i>& b, int j); };
| ^~~
Which I suspect is decent really.