Spec-Zone.ru › C++

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

Определено в заголовке <chrono>
constexpr bool operator==( const std::chrono::leap_second& x,
                           const std::chrono::leap_second& y ) noexcept;
(1) (с C++20)
constexpr std::strong_ordering operator<=>( const std::chrono::leap_second& x,
                                            const std::chrono::leap_second& y ) noexcept;
(2) (с C++20)
template< class Duration >
constexpr bool operator==( const std::chrono::leap_second& x,
                           const std::chrono::sys_time<Duration>& y ) noexcept;
(3) (с C++20)
template< class Duration >
constexpr bool operator< ( const std::chrono::leap_second& x,
                           const std::chrono::sys_time<Duration>& y ) noexcept;
(4) (с C++20)
template< class Duration >
constexpr bool operator< ( const std::chrono::sys_time<Duration>& x,
                           const std::chrono::leap_second& y ) noexcept;
(5) (с C++20)
template< class Duration >
constexpr bool operator> ( const std::chrono::leap_second& x,
                           const std::chrono::sys_time<Duration>& y ) noexcept;
(6) (с C++20)
template< class Duration >
constexpr bool operator> ( const std::chrono::sys_time<Duration>& x,
                           const std::chrono::leap_second& y ) noexcept;
(7) (с C++20)
template< class Duration >
constexpr bool operator<=( const std::chrono::leap_second& x,
                           const std::chrono::sys_time<Duration>& y ) noexcept;
(8) (с C++20)
template< class Duration >
constexpr bool operator<=( const std::chrono::sys_time<Duration>& x,
                           const std::chrono::leap_second& y ) noexcept;
(9) (с C++20)
template< class Duration >
constexpr bool operator>=( const std::chrono::leap_second& x,
                           const std::chrono::sys_time<Duration>& y ) noexcept;
(10) (с C++20)
template< class Duration >
constexpr bool operator>=( const std::chrono::sys_time<Duration>& x,
                           const std::chrono::leap_second& y ) noexcept;
(11) (с 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) (с C++20)

Сравнивает дату и время, представленные объектами x и y.

Тип возвращаемого значения (12) определяется из x.date() <=> y, и, следовательно, тип результата трёхстороннего сравнения для std::chrono::seconds и Duration.

Оператор != синтезируется из operator==.

Значение результата

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

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/chrono/leap_second/operator_cmp

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API