Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | chrono‎ | leap second
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++17)

Elementary string conversions
(C++17)
(C++17)
 
Date and time utilities
(C++11)
(C++11)
Time of day
(C++20)



(C++20)(C++20)(C++20)(C++20)
Clocks
(C++20)
                                             
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Calendars
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Time zones
(C++20)
(C++20)
(C++20)
(C++20)
C-style date and time
 
std::chrono::leap_second
Member functions
Nonmember functions
operator==operator<operator<=operator>operator>=operator<=>
 
Defined in header <chrono>
constexpr bool operator==( const std::chrono::leap_second& x,
                           const std::chrono::leap_second& y ) noexcept;
(1) (since C++20)
constexpr std::strong_ordering operator<=>( const std::chrono::leap_second& x,
                                            const std::chrono::leap_second& y ) noexcept;
(2) (since C++20)
template< class Duration >

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                           const std::chrono::leap_second& y ) noexcept;
(11) (since 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) (since C++20)

Compares the date and time represented by the objects x and y.

Return type of (12) is deduced from x.date() <=> y, and hence the three-way comparison result type of std::chrono::seconds and Duration.

[edit] Return value

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