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() 를 사용하여 수동으로 확인할 수 있습니다.

예제