public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97946] New: passing templated function without template argument
@ 2020-11-23 12:00 niklas at nolte dot dev
2021-08-17 8:24 ` [Bug c++/97946] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: niklas at nolte dot dev @ 2020-11-23 12:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97946
Bug ID: 97946
Summary: passing templated function without template argument
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: niklas at nolte dot dev
Target Milestone: ---
The compiler accepts the following code.
`fun` without template arguments should not be accepted, should it?
```
template<typename T = bool>
void fun() {}
template<typename F>
void higher_order_fun( const F & f) {
f();
}
int main () {
//higher_order_fun(fun<>); //works
higher_order_fun(fun);
}
```
The related stackoverflow question:
https://stackoverflow.com/questions/64872397/passing-function-template-prototype-as-argument
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/97946] passing templated function without template argument
2020-11-23 12:00 [Bug c++/97946] New: passing templated function without template argument niklas at nolte dot dev
@ 2021-08-17 8:24 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-17 8:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97946
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-08-17
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-17 8:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 12:00 [Bug c++/97946] New: passing templated function without template argument niklas at nolte dot dev
2021-08-17 8:24 ` [Bug c++/97946] " 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).