PR c++/86932 - missed SFINAE with empty pack.
authorJason Merrill <jason@redhat.com>
Wed, 27 Mar 2019 14:27:00 +0000 (10:27 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 27 Mar 2019 14:27:00 +0000 (10:27 -0400)
commitce4609958f8db5cd64ec1c3bec624a36d8b35812
tree5fb7fdcf62bba0224c98e9af4d7bdbac59ac3b1e
parent079c81dabf6a5f2fdb054651ec78f74a590a4ad0
PR c++/86932 - missed SFINAE with empty pack.

The issue here was that when processing the explicit template args in
fn_type_unification we added an empty argument pack for the parameter pack,
so we never tried to do any deduction for it, and therefore never looked at
its type.  We need that empty pack behavior for partial ordering, but we
don't want it here, so let's make it conditional on tf_partial.

* pt.c (coerce_template_parms): Don't add an empty pack if
tf_partial.
(fn_type_unification): Pass tf_partial to coerce_template_parms.

From-SVN: r269965
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/sfinae65.C [new file with mode: 0644]