Sign in
fuchsia
/
third_party
/
cmake
/
a6f2ea6adae8ec1a15f2bb25f4fe12c2564577c5
/
.
/
Source
/
Checks
/
cm_cxx_auto_ptr.cxx
blob: d3100fdc83865cde87b8f0409beab696b724ec21 [
file
] [
log
] [
blame
]
#include
<memory>
std
::
auto_ptr
<int>
get_auto_ptr
()
{
std
::
auto_ptr
<int>
ptr
;
ptr
=
std
::
auto_ptr
<int>
(
new
int
(
0
));
return
ptr
;
}
int
use_auto_ptr
(
std
::
auto_ptr
<int>
ptr
)
{
return
*
ptr
;
}
int
main
()
{
return
use_auto_ptr
(
get_auto_ptr
());
}