summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ttp65.C
blob: fbc7deed3450b79aa6614690290671d8038547f4 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
// { dg-do assemble  }

// Copyright (C) 2000 Free Software Foundation
// Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>

// Bug: We used reject template unification of two bound template template
// parameters.

template <class T, class U=int> class C
{
};

template <class T, class U> void f(C<T,U> c)
{
}

template <class T> void f(C<T> c)
{
}

template <template<class,class=int> class C, class T, class U>
void g(C<T,U> c)
{
}

template <template<class,class=int> class C, class T> void g(C<T> c)
{
}

int main()
{
  C<int,char> c1;
  f(c1);
  g(c1);
  C<int,int> c2;
  f(c2);
  g(c2);
}