operator==,!=,<,<=,>,>= (std::experimental::observer_ptr)
From cppreference.net
<
cpp
|
experimental
|
observer ptr
|
template
<
class
W1,
class
W2
>
bool operator == ( const observer_ptr < W1 > & p1, const observer_ptr < W2 > & p2 ) ; |
(1) | (Bibliotheksgrundlagen TS v2) |
|
template
<
class
W1,
class
W2
>
bool operator ! = ( const observer_ptr < W1 > & p1, const observer_ptr < W2 > & p2 ) ; |
(2) | (Bibliotheksgrundlagen TS v2) |
|
template
<
class
W
>
bool operator == ( const observer_ptr < W > & p, std:: nullptr_t ) noexcept ; |
(3) | (Bibliotheksgrundlagen TS v2) |
|
template
<
class
W
>
bool operator == ( std:: nullptr_t , const observer_ptr < W > & p ) noexcept ; |
(4) | (Library Fundamentals TS v2) |
|
template
<
class
W
>
bool operator ! = ( const observer_ptr < W > & p, std:: nullptr_t ) noexcept ; |
(5) | (Bibliotheksfundamente TS v2) |
|
template
<
class
W
>
bool operator ! = ( std:: nullptr_t , const observer_ptr < W > & p ) noexcept ; |
(6) | (Bibliotheksgrundlagen TS v2) |
|
template
<
class
W1,
class
W2
>
bool operator < ( const observer_ptr < W1 > & p1, const observer_ptr < W2 > & p2 ) ; |
(7) | (Bibliotheksgrundlagen TS v2) |
|
template
<
class
W1,
class
W2
>
bool operator > ( const observer_ptr < W1 > & p1, const observer_ptr < W2 > & p2 ) ; |
(8) | (Bibliotheksgrundlagen TS v2) |
|
template
<
class
W1,
class
W2
>
bool operator <= ( const observer_ptr < W1 > & p1, const observer_ptr < W2 > & p2 ) ; |
(9) | (Library Fundamentals TS v2) |
|
template
<
class
W1,
class
W2
>
bool operator >= ( const observer_ptr < W1 > & p1, const observer_ptr < W2 > & p2 ) ; |
(10) | (Bibliotheksgrundlagen TS v2) |
Vergleicht die Zeigerwerte von zwei
observer_ptr
s, oder eines
observer_ptr
s und
nullptr
.
1,2)
Gleichheitsvergleich für zwei
observer_ptr
s.
3-6)
Gleichheitsvergleich für einen
observer_ptr
und
nullptr
.
7-10)
Geordneter Vergleich für zwei
observer_ptr
s.
Parameter
| p, p1, p2 | - |
observer_ptr
zu vergleichende Zeiger
|
Rückgabewert
1)
p1.
get
(
)
==
p2.
get
(
)
2)
!
(
p1
==
p2
)
3,4)
!
p
5,6)
(
bool
)
p
7)
std::
less
<
W3
>
(
)
(
p1.
get
(
)
, p2.
get
(
)
)
, wobei
W3
der zusammengesetzte Zeigertyp von
W1*
und
W2*
ist.
8)
p2
<
p1
9)
!
(
p2
<
p1
)
10)
!
(
p1
<
p2
)