public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56190] New: GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int}
@ 2013-02-03 13:57 schaub.johannes at googlemail dot com
2021-07-27 7:06 ` [Bug c++/56190] " pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: schaub.johannes at googlemail dot com @ 2013-02-03 13:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56190
Bug #: 56190
Summary: GCC fails deducing a "void(*)(int, float, double)" to
a "void(*)(T..., float, double)" with T={int}
Classification: Unclassified
Product: gcc
Version: 4.7.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schaub.johannes@googlemail.com
From
http://stackoverflow.com/questions/14664589/variadic-template-code-compiles-on-gcc-4-6-but-not-on-clang-or-gcc-4-7
:
class Test {
public:
template <class... A2> void print (void(*function)(A2..., float, double)) {
}
};
void test_print (int a, float b, double c) { }
int main () {
Test test;
test.print<int> (&test_print);
}
Fails with
source.cpp:14:33: note: candidate is:
source.cpp:3:33: note: template<class ... A2> void Test::print(void (*)(A2 ...,
float, double))
source.cpp:3:33: note: template argument deduction/substitution failed:
source.cpp:14:33: note: mismatched types 'float' and 'int'
GCC does apparently not substitute the explicitly specified arguments of "A2"
before attempting the argument deduction.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56190] GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int}
2013-02-03 13:57 [Bug c++/56190] New: GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int} schaub.johannes at googlemail dot com
@ 2021-07-27 7:06 ` pinskia at gcc dot gnu.org
2021-07-27 7:06 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-27 7:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56190
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-07-27
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56190] GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int}
2013-02-03 13:57 [Bug c++/56190] New: GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int} schaub.johannes at googlemail dot com
2021-07-27 7:06 ` [Bug c++/56190] " pinskia at gcc dot gnu.org
@ 2021-07-27 7:06 ` pinskia at gcc dot gnu.org
2021-08-10 3:02 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-27 7:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56190
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |v.reshetnikov at gmail dot com
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 84893 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56190] GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int}
2013-02-03 13:57 [Bug c++/56190] New: GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int} schaub.johannes at googlemail dot com
2021-07-27 7:06 ` [Bug c++/56190] " pinskia at gcc dot gnu.org
2021-07-27 7:06 ` pinskia at gcc dot gnu.org
@ 2021-08-10 3:02 ` pinskia at gcc dot gnu.org
2022-02-24 10:26 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-10 3:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56190
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mohsen.tamiz at gmail dot com
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 69205 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56190] GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int}
2013-02-03 13:57 [Bug c++/56190] New: GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int} schaub.johannes at googlemail dot com
` (2 preceding siblings ...)
2021-08-10 3:02 ` pinskia at gcc dot gnu.org
@ 2022-02-24 10:26 ` pinskia at gcc dot gnu.org
2022-05-31 23:30 ` pinskia at gcc dot gnu.org
2022-05-31 23:32 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-24 10:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56190
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eliphat at sjtu dot edu.cn
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 104672 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56190] GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int}
2013-02-03 13:57 [Bug c++/56190] New: GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int} schaub.johannes at googlemail dot com
` (3 preceding siblings ...)
2022-02-24 10:26 ` pinskia at gcc dot gnu.org
@ 2022-05-31 23:30 ` pinskia at gcc dot gnu.org
2022-05-31 23:32 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-31 23:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56190
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hiraditya at msn dot com
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 105796 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56190] GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int}
2013-02-03 13:57 [Bug c++/56190] New: GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int} schaub.johannes at googlemail dot com
` (4 preceding siblings ...)
2022-05-31 23:30 ` pinskia at gcc dot gnu.org
@ 2022-05-31 23:32 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-31 23:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56190
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Simplier example:
```
int func(int, char);
template<typename... TArgs>
int testFunc(int (*)(TArgs..., char));
int x = testFunc<int>(func);
```
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-05-31 23:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-03 13:57 [Bug c++/56190] New: GCC fails deducing a "void(*)(int, float, double)" to a "void(*)(T..., float, double)" with T={int} schaub.johannes at googlemail dot com
2021-07-27 7:06 ` [Bug c++/56190] " pinskia at gcc dot gnu.org
2021-07-27 7:06 ` pinskia at gcc dot gnu.org
2021-08-10 3:02 ` pinskia at gcc dot gnu.org
2022-02-24 10:26 ` pinskia at gcc dot gnu.org
2022-05-31 23:30 ` pinskia at gcc dot gnu.org
2022-05-31 23:32 ` 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).