summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/overload15.C
blob: debad8857a9e79be6ed7a34378f59450c7baae6d (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
25
// { dg-do assemble  }
// Test resolution of templatized overloaded constructors.
// The more specialized constructor, i.e., A (const B<Dim1,Dim2> &b)
// should be chosen per \S 14.5.5.2/2 [temp.func.order/2].

template <int Dim1, int Dim2>
struct B {
  int f;
};

struct A {
  template <int Dim1, int Dim2>
  A (const B<Dim1,Dim2> &b) {}

  template <typename T>
  A (const T &b) {}
};

int
main ()
{
  B<2,3> b;
  A a (b);
  return 0;
}