diff options
Diffstat (limited to 'test/SemaTemplate/ctad.cpp')
-rw-r--r-- | test/SemaTemplate/ctad.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaTemplate/ctad.cpp b/test/SemaTemplate/ctad.cpp new file mode 100644 index 0000000000..f2944655b3 --- /dev/null +++ b/test/SemaTemplate/ctad.cpp @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -std=c++17 -verify %s + +// expected-no-diagnostics +namespace pr41427 { + template <typename T> class A { + public: + A(void (*)(T)) {} + }; + + void D(int) {} + + void f() { + A a(&D); + using T = decltype(a); + using T = A<int>; + } +} |