Namespaces
Variants
Views
Actions

std::auto_ptr::operator auto_ptr<Y>

From cppreference.com
< cpp‎ | memory‎ | auto ptr
Revision as of 08:25, 15 August 2013 by P12 (Talk | contribs)

 
 
 
 
 
template< class Y >
operator auto_ptr_ref<Y>();
(1) (deprecated)
template< class Y >
operator auto_ptr<Y>();
(2) (deprecated)

Converts *this to an auto_ptr for a different type Y.

1) Returns an implementation-defined type that holds a reference to *this. The implementation is allowed to provide the template with a different name or implement equivalent functionality in other ways.
2) Constructs a new auto_ptr with a pointer obtained by calling release().

Parameters

(none)

Return value

1) An implementation-defined type that holds a reference to *this
2) A auto_ptr with a pointer obtained by calling release().

Exceptions

(none)