Namespaces
Variants

std::indirect<T, Allocator>:: operator->, std::indirect<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以降)
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() を使用して確認できます。