Anmerkung
Der Zugriff auf diese Seite erfordert eine Genehmigung. Du kannst versuchen, dich anzumelden oder die Verzeichnisse zu wechseln.
Der Zugriff auf diese Seite erfordert eine Genehmigung. Du kannst versuchen , die Verzeichnisse zu wechseln.
operator==
Testet, ob das optional-Objekt links vom Operator gleich dem optional-Objekt rechts vom Operator ist.
template <class T, class U> constexpr bool operator==(const optional<T>& left, const optional<U>& right);
template <class T> constexpr bool operator==(const optional<T>& left, nullopt_t right) noexcept;
template <class T> constexpr bool operator==(nullopt_t left, const optional<T>& right) noexcept;
template <class T, class U> constexpr bool operator==(const optional<T>&, const U&);
template <class T, class U> constexpr bool operator==(const U&, const optional<T>&);
Parameter
left
Ein Objekt vom Typ optional, nullopt_t, oder T.
right
Ein Objekt vom Typ optional, nullopt_t, oder T.
operator!=
Testet, ob das optional-Objekt links vom Operator ungleich dem optional-Objekt rechts vom Operator ist.
template <class T, class U> constexpr bool operator!=(const optional<T>&, const optional<U>&);
template <class T> constexpr bool operator!=(const optional<T>&, nullopt_t) noexcept;
template <class T> constexpr bool operator!=(nullopt_t, const optional<T>&) noexcept;
template <class T, class U> constexpr bool operator!=(const optional<T>&, const U&);
template <class T, class U> constexpr bool operator!=(const U&, const optional<T>&);
Parameter
left
Ein Objekt vom Typ optional, nullopt_t, oder T.
right
Ein Objekt vom Typ optional, nullopt_t, oder T.
Hinweise
Die dritte Vorlagenfunktion gibt !(left == right) zurück.
operator<
Testet, ob das optional-Objekt links vom Operator kleiner als das optional-Objekt auf der rechten Seite ist.
template <class T, class U> constexpr bool operator<(const optional<T>&, const optional<U>&);
template <class T> constexpr bool operator<(const optional<T>&, nullopt_t) noexcept;
template <class T> constexpr bool operator<(nullopt_t, const optional<T>&) noexcept;
template <class T, class U> constexpr bool operator<(const optional<T>&, const U&);
template <class T, class U> constexpr bool operator<(const U&, const optional<T>&);
Parameter
left
Ein Objekt vom Typ optional, nullopt_t, oder T.
right
Ein Objekt vom Typ optional, nullopt_t, oder T.
Rückgabewert
true, wenn die Liste links vom Operator kleiner als, aber ungleich der Liste rechts vom Operator ist; andernfalls false.
operator<=
Testet, ob das optional-Objekt links vom Operator kleiner oder gleich dem optional-Objekt auf der rechten Seite ist.
template <class T, class U> constexpr bool operator<=(const optional<T>&, const optional<U>&);
template <class T> constexpr bool operator<=(const optional<T>&, nullopt_t) noexcept;
template <class T> constexpr bool operator<=(nullopt_t, const optional<T>&) noexcept;
template <class T, class U> constexpr bool operator<=(const optional<T>&, const U&);
template <class T, class U> constexpr bool operator<=(const U&, const optional<T>&);
Parameter
left
Ein Objekt vom Typ optional, nullopt_t, oder T.
right
Ein Objekt vom Typ optional, nullopt_t, oder T.
Rückgabewert
true, wenn die Liste links vom Operator kleiner als oder gleich der Liste rechts des Operators ist; andernfalls false
Hinweise
Die dritte Vorlagenfunktion gibt !(right < left) zurück.
operator>
Testet, ob das optional-Objekt links vom Operator größer als das optional-Objekt auf der rechten Seite ist.
template <class T, class U> constexpr bool operator>(const optional<T>&, const optional<U>&);
template <class T> constexpr bool operator>(const optional<T>&, nullopt_t) noexcept;
template <class T> constexpr bool operator>(nullopt_t, const optional<T>&) noexcept;
template <class T, class U> constexpr bool operator>(const optional<T>&, const U&);
template <class T, class U> constexpr bool operator>(const U&, const optional<T>&);
Parameter
left
Ein Objekt vom Typ optional, nullopt_t, oder T.
right
Ein Objekt vom Typ optional, nullopt_t, oder T.
Rückgabewert
true, wenn die Liste links vom Operator größer als die Liste rechts vom Operator ist; andernfalls false
Hinweise
Die dritte Vorlagenfunktion gibt right < left zurück.
operator>=
Testet, ob das optional-Objekt links vom Operator größer oder gleich dem optional-Objekt auf der rechten Seite ist.
template <class T, class U> constexpr bool operator>=(const optional<T>&, const optional<U>&);
template <class T> constexpr bool operator>=(const optional<T>&, nullopt_t) noexcept;
template <class T> constexpr bool operator>=(nullopt_t, const optional<T>&) noexcept;
template <class T, class U> constexpr bool operator>=(const optional<T>&, const U&);
template <class T, class U> constexpr bool operator>=(const U&, const optional<T>&);
Parameter
left
Ein Objekt vom Typ optional, nullopt_t, oder T.
right
Ein Objekt vom Typ optional, nullopt_t, oder T.
Rückgabewert
true wenn die optional linke Seite des Operators größer oder gleich der optional auf der rechten Seite des Operators ist; andernfalls false.
Hinweise
Diese Vorlagenfunktion gibt !(left < right) zurück.