]> granicus.if.org Git - clang/commit
Fix template argument deduction when only some of a parameter pack is a non-deduced...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 4 Jan 2017 01:48:55 +0000 (01:48 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 4 Jan 2017 01:48:55 +0000 (01:48 +0000)
commit08f2fcfb4c15294345893d17b24cafab80d58019
treea13ef7ab36270263cf093f41e2a471ea99141c84
parente5eb147a7b0cb5a126611d43f3482ec8427bd2da
Fix template argument deduction when only some of a parameter pack is a non-deduced context.

When a parameter pack has multiple corresponding arguments, and some subset of
them are overloaded functions, it's possible that some subset of the parameters
are non-deduced contexts. In such a case, keep deducing from the remainder of
the arguments, and resolve the incomplete pack against whatever other
deductions we've performed for the pack.

GCC, MSVC, and ICC give three different bad behaviors for this case; what we do
now (and what we did before) don't exactly match any of them, sadly :( I'm
getting a core issue opened to specify more precisely how this should be
handled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290923 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaTemplateDeduction.cpp
test/SemaTemplate/deduction.cpp