std::experimental::shared_ptr<T>::operator*, std::experimental::shared_ptr<T>::operator->
来自 cppreference.cn
< cpp | experimental | shared ptr
T& operator*() const noexcept; |
(1) | (library fundamentals TS) |
T* operator->() const noexcept; |
(2) | (library fundamentals TS) |
解引用存储的指针。如果存储的指针为空,则行为未定义。
目录 |
[编辑] 参数
(无)
[编辑] 返回值
1) 解引用存储的指针的结果,即 *get()。
2) 存储的指针,即 get()。
[编辑] 注解
当 T
是数组类型或(可能带有 cv 限定符的)void 时,未指定是否声明函数 (1)。
当 T
是数组类型时,未指定是否声明函数 (2)。
在任何一种情况下,如果声明了该函数,则未指定其返回类型是什么,但保证该函数的声明(虽然不一定是定义)是合法的。
[编辑] 示例
本节尚不完整 原因:没有示例 |
[编辑] 参见
返回存储的指针 (公共成员函数) |