diff options
Diffstat (limited to 'test/SemaTemplate/copy-ctor-assign.cpp')
-rw-r--r-- | test/SemaTemplate/copy-ctor-assign.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/SemaTemplate/copy-ctor-assign.cpp b/test/SemaTemplate/copy-ctor-assign.cpp index 90fb0133a721..69481ea557f4 100644 --- a/test/SemaTemplate/copy-ctor-assign.cpp +++ b/test/SemaTemplate/copy-ctor-assign.cpp @@ -33,4 +33,20 @@ void test3(X<int> &x, X<int> xi, X<long> xl, X<int Y::*> xmptr) { x = xi; x = xl; x = xmptr; // expected-note{{instantiation}} -}
\ No newline at end of file +} + +struct X1 { + X1 &operator=(const X1&); +}; + +template<typename T> +struct X2 : X1 { + template<typename U> X2 &operator=(const U&); +}; + +struct X3 : X2<int> { +}; + +void test_X2(X3 &to, X3 from) { + to = from; +} |