FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / template22.C
blobce247e80752edd6171533a910086223e692dffc3
1 // Testcase for proper unification of code involving references.
2 // Build don't link:
4 template<class T>
5 struct A
7     void foo();
8 };
10 template<class T> void A<T>::foo() { }
12 template class A<int&>;
14 const int& f1 ();
15 int& f2 ();
16 int f3 ();
18 template <class T> void g1 (const T&);
19 template <class T> void g2 (T&);
20 template <class T> void g3 (T);
22 int main()
24   g1 (f1 ());
25   g1 (f2 ());
26   g1 (f3 ());
27   g2 (f2 ());
28   g3 (f1 ());
29   g3 (f2 ());
30   g3 (f3 ());