std::polymorphic<T, Allocator>:: operator->, std::polymorphic<T, Allocator>:: operator*
From cppreference.net
<
cpp
|
memory
|
polymorphic
C++
Memory management library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::polymorphic
| Member functions | ||||
| Observers | ||||
|
polymorphic::operator->
polymorphic::operator*
|
||||
| Modifiers | ||||
| Non-member functions | ||||
|
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 起) |
访问被拥有的值。
1,2)
返回指向被拥有值的指针。
3,4)
返回被持有值的引用。
如果 * this 不包含有效值,则行为未定义。
返回值
如上所述。
注释
此运算符不会检查
*
this
是否处于无值状态,用户可通过手动调用
valueless_after_move()
来实现该检查。
示例
|
本节内容不完整
原因:缺少示例 |