2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / g++.dg / overload / autoptr1.C
blobfc81083500ec08cfc31e832364c6c6ebe6387665
1 // PR c++/35773
3 template< typename T >
4 class auto_ptr
6   struct auto_ptr_ref { };
7 public:
8   auto_ptr(auto_ptr&);
9   auto_ptr(auto_ptr_ref);
11   operator auto_ptr_ref();
14 template< typename T >
15 class reference_wrapper
17 public:
18   reference_wrapper(T& t);
19   operator T& () const;
22 struct X { };
24 void f(auto_ptr< X >);
26 void g(reference_wrapper< auto_ptr< X > > r)
28   f(r);