diff options
Diffstat (limited to 'test/SemaTemplate/friend-template.cpp')
-rw-r--r-- | test/SemaTemplate/friend-template.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/SemaTemplate/friend-template.cpp b/test/SemaTemplate/friend-template.cpp index 1d62804..703daea 100644 --- a/test/SemaTemplate/friend-template.cpp +++ b/test/SemaTemplate/friend-template.cpp @@ -93,7 +93,7 @@ namespace test4 { }; template<typename T> void f(const A<T>&) { - int a[sizeof(T) ? -1 : -1]; // expected-error {{array size is negative}} + int a[sizeof(T) ? -1 : -1]; // expected-error {{array with a negative size}} } void f() { @@ -207,3 +207,12 @@ namespace PR7013b { } } + +namespace PR8649 { + template<typename T, typename U, unsigned N> + struct X { + template<unsigned M> friend class X<T, U, M>; // expected-error{{partial specialization cannot be declared as a friend}} + }; + + X<int, float, 7> x; +} |