// { dg-do run } // PRMS Id: 6393 // Bug: g++ is too lax in considering UPTs to be the same. template class Bar { public: R do_bar (T arg); }; template class Foo { T i; public: void do_foo () {} void do_foo (T const & t) {} void do_foo (Bar const & bar); // {} Put the body here and it works void do_foo (Bar const & bar); // {} Put the body here and it works }; // These definitions don't work template inline void Foo:: do_foo (Bar const & bar) {} template inline void Foo:: do_foo (Bar const & bar) {} int main () { int i; Bar bar1; Bar bar2; Foo foo; foo.do_foo(); foo.do_foo(i); foo.do_foo(bar1); foo.do_foo(bar2); return 0; }