diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-12-21 19:43:39 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-12-21 19:43:39 +0000 |
commit | dadec7da208c7f5236133872613a09c2231c4bb7 (patch) | |
tree | 3c8cad70d8b803fa47b318b7acf6f6e263ebd1df /test/SemaTemplate | |
parent | 50739c04c36d228f7e79227d2ae69b75174bb660 (diff) |
When instantiating a deduction guide, transform its name.
Otherwise it will serve as a deduction guide for the wrong class template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321297 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r-- | test/SemaTemplate/nested-deduction-guides.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/nested-deduction-guides.cpp b/test/SemaTemplate/nested-deduction-guides.cpp new file mode 100644 index 0000000000..2c5dda456a --- /dev/null +++ b/test/SemaTemplate/nested-deduction-guides.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++17 -verify %s +// expected-no-diagnostics + +template<typename T> struct A { + template<typename U> struct B { + B(...); + }; + template<typename U> B(U) -> B<U>; +}; +A<void>::B b = 123; + +using T = decltype(b); +using T = A<void>::B<int>; |