]> granicus.if.org Git - clang/commit
[c++20] Disallow template argument deduction from a braced-init-list
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 31 Aug 2019 00:05:50 +0000 (00:05 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 31 Aug 2019 00:05:50 +0000 (00:05 +0000)
commita5c7040f4d3316305921ac27de113eb9b807f4c3
tree59b656c415dd88ab4ebb5d2372e5a34bee312201
parent1d98bab4c4d1810b10e329ad3d185334a4320121
[c++20] Disallow template argument deduction from a braced-init-list
containing designators. The C++20 wording doesn't actually say what
happens in this case, but treating this as a non-deduced context seems
like the most natural behavior.

(We might want to consider deducing through array designators as an
extension in the future, but will need to be careful to deduce the array
bound properly if we do so. That's not permitted herein.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370555 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateDeduction.cpp
test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
test/SemaTemplate/deduction.cpp