diff options
Diffstat (limited to 'test/SemaCXX/cxx1z-class-template-argument-deduction.cpp')
-rw-r--r-- | test/SemaCXX/cxx1z-class-template-argument-deduction.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp b/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp index f72cb886d81ad..cbf7c2eee51cd 100644 --- a/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp +++ b/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp @@ -373,6 +373,35 @@ void bar(D<int>& d) { } } +namespace rdar41330135 { +template <int> struct A {}; +template <class T> +struct S { + template <class U> + S(T a, U t, A<sizeof(t)>); +}; +template <class T> struct D { + D(T t, A<sizeof(t)>); +}; +int f() { + S s(0, 0, A<sizeof(int)>()); + D d(0, A<sizeof(int)>()); +} + +namespace test_dupls { +template<unsigned long> struct X {}; +template<typename T> struct A { + A(T t, X<sizeof(t)>); +}; +A a(0, {}); +template<typename U> struct B { + B(U u, X<sizeof(u)>); +}; +B b(0, {}); +} + +} + #else // expected-no-diagnostics |