Export (0) Print
Expand All

auto_ptr::operator->

The operator for allowing member access.

Type *operator->( ) const throw( );

A member of the object that auto_ptr owns.

The selection operator returns get( ), so that the expression ap->member behaves the same as ( ap.get( ) )->member, where ap is an object of class auto_ptr<Type>. Hence, the stored pointer must not be null, and Type must be a class, struct, or union type with a member member.

For an example of how to use the member function, see auto_ptr::auto_ptr.

Header: <memory>

Namespace: std

Show:
© 2014 Microsoft