This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66659] New: Accepts invalid when undeduced context encountered deducing from a trailing parameter pack
- From: "hstong at ca dot ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 24 Jun 2015 22:38:35 +0000
- Subject: [Bug c++/66659] New: Accepts invalid when undeduced context encountered deducing from a trailing parameter pack
- Auto-submitted: auto-generated
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)