public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66659] New: Accepts invalid when undeduced context encountered deducing from a trailing parameter pack
@ 2015-06-24 22:38 hstong at ca dot ibm.com
2021-08-11 22:41 ` [Bug c++/66659] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: hstong at ca dot ibm.com @ 2015-06-24 22:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66659
Bug ID: 66659
Summary: Accepts invalid when undeduced context encountered
deducing from a trailing parameter pack
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hstong at ca dot ibm.com
Target Milestone: ---
In the call to "f" from "h" below, the deduction for T@0 should find both
"fptype" and "Func" and fail.
### SOURCE (<stdin>):
template <typename ...T> struct A;
void g();
void g(bool);
typedef void (*fptype)();
struct Func { operator fptype(); } func;
template<typename ...T> void f(A<T ...> *ap, T ...b);
void h(A<fptype, fptype> *ap) { f(ap, func, g); }
### COMPILER INVOCATION:
g++ -std=c++11 -c -x c++ -
### ACTUAL OUTPUT:
(Clean compile).
### EXPECTED OUTPUT:
(Error message).
### COMPILER VERSION INFO:
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-head/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-head/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/heads/gcc/gcc-source/configure
--prefix=/usr/local/gcc-head --enable-languages=c,c++ --enable-lto
--disable-multilib --without-ppl --without-cloog-ppl --enable-checking=release
--disable-nls
Thread model: posix
gcc version 6.0.0 20150623 (experimental) (GCC)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/66659] Accepts invalid when undeduced context encountered deducing from a trailing parameter pack
2015-06-24 22:38 [Bug c++/66659] New: Accepts invalid when undeduced context encountered deducing from a trailing parameter pack hstong at ca dot ibm.com
@ 2021-08-11 22:41 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-11 22:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66659
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-08-11
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
clang produces:
<source>:12:33: error: no matching function for call to 'f'
void h(A<fptype, fptype> *ap) { f(ap, func, g); }
^
<source>:10:30: note: candidate template ignored: deduced conflicting types for
parameter 'T' (<void (*)(), void (*)()> vs. <Func, (no value)>)
template<typename ...T> void f(A<T ...> *ap, T ...b);
^
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-11 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 22:38 [Bug c++/66659] New: Accepts invalid when undeduced context encountered deducing from a trailing parameter pack hstong at ca dot ibm.com
2021-08-11 22:41 ` [Bug c++/66659] " 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).