Namensräume
Varianten
Aktionen

std::chrono::operator==,<,<=,>,>=,<=>(std::chrono::leap_second)

Von cppreference.com
< cpp‎ | chrono‎ | leap second
 
 
 
std::chrono::leap_second
Memberfunktionen
Nicht-Member-Funktionen
operator==operator<operator<=operator>operator>=operator<=>
Hilfsklassen
 
Definiert in Header <chrono>
constexpr bool operator==( const std::chrono::leap_second& x,
                           const std::chrono::leap_second& y ) noexcept;
(1) (seit C++20)
constexpr std::strong_ordering operator<=>( const std::chrono::leap_second& x,
                                            const std::chrono::leap_second& y ) noexcept;
(2) (seit C++20)
template< class Duration >

constexpr bool operator==( const std::chrono::leap_second& x,

                           const std::chrono::sys_time<Duration>& y ) noexcept;
(3) (seit C++20)
template< class Duration >

constexpr bool operator< ( const std::chrono::leap_second& x,

                           const std::chrono::sys_time<Duration>& y ) noexcept;
(4) (seit C++20)
template< class Duration >

constexpr bool operator< ( const std::chrono::sys_time<Duration>& x,

                           const std::chrono::leap_second& y ) noexcept;
(5) (seit C++20)
template< class Duration >

constexpr bool operator> ( const std::chrono::leap_second& x,

                           const std::chrono::sys_time<Duration>& y ) noexcept;
(6) (seit C++20)
template< class Duration >

constexpr bool operator> ( const std::chrono::sys_time<Duration>& x,

                           const std::chrono::leap_second& y ) noexcept;
(7) (seit C++20)
template< class Duration >

constexpr bool operator<=( const std::chrono::leap_second& x,

                           const std::chrono::sys_time<Duration>& y ) noexcept;
(8) (seit C++20)
template< class Duration >

constexpr bool operator<=( const std::chrono::sys_time<Duration>& x,

                           const std::chrono::leap_second& y ) noexcept;
(9) (seit C++20)
template< class Duration >

constexpr bool operator>=( const std::chrono::leap_second& x,

                           const std::chrono::sys_time<Duration>& y ) noexcept;
(10) (seit C++20)
template< class Duration >

constexpr bool operator>=( const std::chrono::sys_time<Duration>& x,

                           const std::chrono::leap_second& y ) noexcept;
(11) (seit C++20)
template< class Duration >

    requires std::three_way_comparable_with<
        std::chrono::sys_seconds, std::chrono::sys_time<Duration>>
constexpr auto operator<=>( const std::chrono::leap_second& x,

                            const std::chrono::sys_time<Duration>& y ) noexcept;
(12) (seit C++20)

Vergleicht das Datum und die Uhrzeit, die von den Objekten x und y dargestellt werden.

Der Rückgabetyp von (12) wird aus x.date() <=> y abgeleitet, und somit der Dreifachvergleichs-Ergebnistyp von std::chrono::seconds und Duration.

Der Operator != wird aus operator== synthetisiert.

[bearbeiten] Rückgabewert

1) x.date() == y.date()
2) x.date() <=> y.date()
3) x.date() == y
4) x.date() < y
5) x < y.date()
6) x.date() > y
7) x > y.date()
8) x.date() <= y
9) x <= y.date()
10) x.date() >= y
11) x >= y.date()
12) x.date() <=> y