1// { dg-do run  }
2// PRMS Id: 6393
3// Bug: g++ is too lax in considering UPTs to be the same.
4
5template <class R, class T>
6class Bar
7{
8public:
9  R do_bar (T arg);
10};
11
12
13template <class T>
14class Foo
15{
16  T i;
17
18public:
19  void do_foo () {}
20  void do_foo (T const & t) {}
21  void do_foo (Bar<char, T> const & bar);  // {} Put the body here and it works
22  void do_foo (Bar<T, T> const & bar);     // {} Put the body here and it works
23};
24
25// These definitions don't work
26
27template <class T>
28inline void Foo<T>::
29do_foo (Bar<char, T> const & bar)
30{}
31
32template <class T>
33inline void Foo<T>::
34do_foo (Bar<T, T> const & bar)
35{}
36
37
38int main ()
39{ int i;
40  Bar<char, int> bar1;
41  Bar<int, int>  bar2;
42  Foo<int> foo;
43  foo.do_foo();
44  foo.do_foo(i);
45  foo.do_foo(bar1);
46  foo.do_foo(bar2);
47
48  return 0;
49}
50