[C++17] Fix class template argument deduction for default constructors without an...
authorZhihao Yuan <zy@miator.net>
Sat, 24 Mar 2018 04:32:11 +0000 (04:32 +0000)
committerZhihao Yuan <zy@miator.net>
Sat, 24 Mar 2018 04:32:11 +0000 (04:32 +0000)
commit2c5471ddc7858c56274de830481f940de7c509e7
tree88da40b30da996ddee69f16c2abb0ddec199ee48
parent40eb34607c7f5948a62bea3fd510c749ff7f109d
[C++17] Fix class template argument deduction for default constructors without an initializer

Summary:
As the title says, this makes following code compile:

```
template<typename> struct Foo {};
Foo() -> Foo<void>;

Foo f; // ok
```

Thanks Nicolas Lesser for coining the fix.

Reviewers: rsmith, lichray

Reviewed By: rsmith, lichray

Subscribers: lichray, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D38216

llvm-svn: 328409
clang/lib/Sema/SemaDecl.cpp
clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.class.deduct/p1.cpp
clang/test/Parser/cxx1z-class-template-argument-deduction.cpp