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) (desde C++26)
constexpr pointer operator - > ( ) noexcept ;
(2) (desde C++26)
constexpr const T & operator * ( ) const & noexcept ;
(3) (desde C++26)
constexpr T & operator * ( ) & noexcept ;
(4) (desde C++26)
constexpr const T && operator * ( ) const && noexcept ;
(5) (desde C++26)
constexpr T && operator * ( ) && noexcept ;
(6) (desde C++26)

Accede al valor poseído.

1,2) Devuelve un puntero al valor poseído.
3-6) Devuelve una referencia al valor poseído.

Si * this no tiene valor, el comportamiento es indefinido.

Valor de retorno

1,2) p
3,4) * p
5,6) std :: move ( * p  )

Notas

Este operador no verifica si * this carece de valor, los usuarios pueden hacerlo manualmente usando valueless_after_move() .

Ejemplo