summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/friend28.C
blob: 5e06e2167fc286a1427e8ddf8915ffd14f85aabf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// { dg-do assemble  }

class mystream;

template <class T> class a;

template <class T> mystream& operator>>( mystream& s, a<T>& thea );

template <class T> class a {
public:
	friend mystream& operator>> <>( mystream&, a<T>& thea );
private:
	T amember;
};

template<> mystream& operator>> <int>( mystream& s, a<int>& thea );

template class a<int>;

template<> mystream& operator>> <int>( mystream& s, a<int>& thea )
{
	thea.amember = 0;
	return s;
}