| 1 |
// { dg-do assemble } |
| 2 |
|
| 3 |
// Copyright (C) 2000 Free Software Foundation |
| 4 |
// Contributed by Kriang Lerdsuwanakij <[email protected]> |
| 5 |
|
| 6 |
// Bug: We used reject template unification of two bound template template |
| 7 |
// parameters. |
| 8 |
|
| 9 |
template <class T, class U=int> class C |
| 10 |
{ |
| 11 |
}; |
| 12 |
|
| 13 |
template <class T, class U> void f(C<T,U> c) |
| 14 |
{ |
| 15 |
} |
| 16 |
|
| 17 |
template <class T> void f(C<T> c) |
| 18 |
{ |
| 19 |
} |
| 20 |
|
| 21 |
template <template<class,class=int> class C, class T, class U> |
| 22 |
void g(C<T,U> c) |
| 23 |
{ |
| 24 |
} |
| 25 |
|
| 26 |
template <template<class,class=int> class C, class T> void g(C<T> c) |
| 27 |
{ |
| 28 |
} |
| 29 |
|
| 30 |
int main() |
| 31 |
{ |
| 32 |
C<int,char> c1; |
| 33 |
f(c1); |
| 34 |
g(c1); |
| 35 |
C<int,int> c2; |
| 36 |
f(c2); |
| 37 |
g(c2); |
| 38 |
} |