diff options
Diffstat (limited to 'test/SemaTemplate/partial-spec-instantiate.cpp')
-rw-r--r-- | test/SemaTemplate/partial-spec-instantiate.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaTemplate/partial-spec-instantiate.cpp b/test/SemaTemplate/partial-spec-instantiate.cpp index 3156892..68b4964 100644 --- a/test/SemaTemplate/partial-spec-instantiate.cpp +++ b/test/SemaTemplate/partial-spec-instantiate.cpp @@ -18,3 +18,23 @@ struct X2<U*> { }; void a(char *a, char *b) {X2<char*>::f();} + +namespace WonkyAccess { + template<typename T> + struct X { + int m; + }; + + template<typename U> + class Y; + + template<typename U> + struct Y<U*> : X<U> { }; + + template<> + struct Y<float*> : X<float> { }; + + int f(Y<int*> y, Y<float*> y2) { + return y.m + y2.m; + } +} |