]> granicus.if.org Git - clang/commit
[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)
commitb6f2fc5248bcd5628dfb8dcb10fe820b9f74c18d
treef0734d097083d0582d5e130eca36121c7aa85f48
parent11fccd4935a891df4cbbd67c03c418951a459caf
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328409 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.class.deduct/p1.cpp
test/Parser/cxx1z-class-template-argument-deduction.cpp