2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-10-13 22:39:41 +08:00
|
|
|
template<typename T>
|
|
|
|
void f(T);
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
struct A { };
|
|
|
|
|
|
|
|
struct X {
|
2010-03-24 15:46:06 +08:00
|
|
|
template<> friend void f<int>(int); // expected-error{{in a friend}}
|
2009-10-13 22:39:41 +08:00
|
|
|
template<> friend class A<int>; // expected-error{{cannot be a friend}}
|
|
|
|
|
|
|
|
friend void f<float>(float); // okay
|
|
|
|
friend class A<float>; // okay
|
|
|
|
};
|