auto_ptr::operator->

允许有成员访问运算符。

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

返回值

auto_ptr 拥有对象的成员。

备注

选择运算符返回 获取( ),因此,表达式 *ap->*member 相同的行为与( apget() - >member,其中 ap 是选件类 auto_ptr<*** 类型 ***>对象。因此,存储的指针不能为 null,因此,*** 类型 *** 必须是选件类、结构或联合类型与 member 成员。

示例

有关的示例演示如何使用成员函数,请参见 auto_ptr::auto_ptr

要求

标头: <memory>

命名空间: std

请参见

参考

auto_ptr Class