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

Greift auf den eigenen Wert zu.

1,2) Gibt einen Zeiger auf den besessenen Wert zurück.
3-6) Gibt eine Referenz auf den enthaltenen Wert zurück.

Wenn * this wertlos ist, ist das Verhalten undefiniert.

Rückgabewert

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

Hinweise

Dieser Operator prüft nicht, ob * this wertlos ist, Benutzer können dies manuell mit valueless_after_move() überprüfen.

Beispiel