auto_ptr::operator->

The operator for allowing member access.

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

Return Value

A member of the object that auto_ptr owns.

Remarks

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.

Example

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

Requirements

Header: <memory>

Namespace: std

See Also

Concepts

auto_ptr Class

auto_ptr Members