std::chrono::operator ==,!=,<,<=,>,>= (std::chrono::month_day)

来自cppreference.com
< cpp‎ | chrono‎ | month day
 
 
日期和时间工具
(C++11)
(C++11)
时钟
(C++20)
                                                  
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
日历
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
时区
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
C 风格日期和时间
 
std::chrono::month_day
成员函数
非成员函数
operator==operator!=operator<operator<=operator>operator>=
 
constexpr bool operator==(const std::chrono::month_day& x,
                          const std::chrono::month_day& y) noexcept;
(1) (C++20 起)
constexpr bool operator!=(const std::chrono::month_day& x,
                          const std::chrono::month_day& y) noexcept;
(2) (C++20 起)
constexpr bool operator<(const std::chrono::month_day& x,
                         const std::chrono::month_day& y) noexcept;
(3) (C++20 起)
constexpr bool operator>(const std::chrono::month_day& x,
                         const std::chrono::month_day& y) noexcept;
(4) (C++20 起)
constexpr bool operator<=(const std::chrono::month_day& x,
                          const std::chrono::month_day& y) noexcept;
(5) (C++20 起)
constexpr bool operator>=(const std::chrono::month_day& x,
                          const std::chrono::month_day& y) noexcept;
(6) (C++20 起)

比较二个 month_day 对象。

返回值

1) x.month() == y.month() && x.day() == y.day()
2) !(x == y).
3) x.month() < y.month() || (x.month() == y.month() && x.day() < y.day())
4) y < x
5) !(y < x)
6) !(x < y)