PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / parse / crash12.C
blob61921fded8f9ac48d6fa0185a2e7faf5afffb5ab
1 // { dg-do compile }
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 {};
8 template <class _Tp>
9 class counted_ptr { // { dg-message "defined here" }
10 public:
11   counted_ptr(::auto_ptr<_Tp>& __a);            // { dg-message "candidate" }
12   ::auto_ptr<_Tp> auto_ptr();
15 template <class _Tp>
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 }
22 template <class _Tp>
23 inline class auto_ptr<_Tp> counted_ptr<_Tp>::auto_ptr()