public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20906] excessive diagnostic messages for missing template arguments
[not found] <bug-20906-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-16 22:37 ` pinskia at gcc dot gnu.org
2021-12-16 22:39 ` [Bug c++/20906] [C++98/C++11/c++14 only] " pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-16 22:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20906
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|REOPENED |NEW
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/20906] [C++98/C++11/c++14 only] excessive diagnostic messages for missing template arguments
[not found] <bug-20906-4@http.gcc.gnu.org/bugzilla/>
2021-12-16 22:37 ` [Bug c++/20906] excessive diagnostic messages for missing template arguments pinskia at gcc dot gnu.org
@ 2021-12-16 22:39 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-16 22:39 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-16 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-20906-4@http.gcc.gnu.org/bugzilla/>
2021-12-16 22:37 ` [Bug c++/20906] excessive diagnostic messages for missing template arguments pinskia at gcc dot gnu.org
2021-12-16 22:39 ` [Bug c++/20906] [C++98/C++11/c++14 only] " pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).