std::indirect<T, Allocator>:: operator->, std::indirect<T, Allocator>:: operator*
From cppreference.net
C++
Memory management library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::indirect
| Member functions | ||||
| Observers | ||||
|
indirect::operator->
indirect::operator*
|
||||
| Modifiers | ||||
| Non-member functions | ||||
| Deduction guides | ||||
| Helper classes | ||||
|
constexpr
const_pointer operator
-
>
(
)
const
noexcept
;
|
(1) | (自 C++26 起) |
|
constexpr
pointer operator
-
>
(
)
noexcept
;
|
(2) | (自 C++26 起) |
|
constexpr
const
T
&
operator
*
(
)
const
&
noexcept
;
|
(3) | (自 C++26 起) |
|
constexpr
T
&
operator
*
(
)
&
noexcept
;
|
(4) | (自 C++26 起) |
|
constexpr
const
T
&&
operator
*
(
)
const
&&
noexcept
;
|
(5) | (自 C++26 起) |
|
constexpr
T
&&
operator
*
(
)
&&
noexcept
;
|
(6) | (自 C++26 起) |
访问被拥有的值。
1,2)
返回指向被拥有值的指针。
3-6)
返回被拥有值的引用。
如果 * this 不包含有效值,则行为未定义。
返回值
1,2)
p
3,4)
*
p
5,6)
std
::
move
(
*
p
)
注释
此运算符不会检查
*
this
是否处于无值状态,用户可通过手动调用
valueless_after_move()
来实现该检查。
示例
|
本节内容不完整
原因:缺少示例 |