FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / overload15.C
blobdefadadb1119dc18ceafda789b07390d7fa09d06
1 // Build don't link:
2 // Test resolution of templatized overloaded constructors.
3 // The more specialized constructor, i.e., A (const B<Dim1,Dim2> &b)
4 // should be chosen per \S 14.5.5.2/2 [temp.func.order/2].
6 template <int Dim1, int Dim2>
7 struct B {
8   int f;
9 };
11 struct A {
12   template <int Dim1, int Dim2>
13   A (const B<Dim1,Dim2> &b) {}
15   template <typename T>
16   A (const T &b) {}
19 int
20 main ()
22   B<2,3> b;
23   A a (b);
24   return 0;