3 // Origin: Martin von Loewis <martin@v.loewis.de>
5 // PR c++/157: Incorrect type/template decision in function parameter.
7 template <class _Tp> class auto_ptr {};
9 class counted_ptr { // { dg-message "defined here" }
11 counted_ptr(::auto_ptr<_Tp>& __a); // { dg-message "candidate" }
12 ::auto_ptr<_Tp> auto_ptr();
16 inline counted_ptr<_Tp>::counted_ptr(class auto_ptr& __a)
17 // { dg-error "no declaration matches" "" { target *-*-* } .-1 }
18 // { dg-error "template argument required" "" { target *-*-* } .-2 }
23 inline class auto_ptr<_Tp> counted_ptr<_Tp>::auto_ptr()