Namespaces
Variants

std::polymorphic<T, Allocator>:: operator->, std::polymorphic<T, Allocator>:: operator*

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
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() を使用して確認できます。