std::chrono::operator ==,!= (std::chrono::weekday)

来自cppreference.com
< cpp‎ | chrono‎ | weekday
 
 
 
日期和时间工具
(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 风格日期和时间
 
 
constexpr bool operator==(const std::chrono::weekday& x, const std::chrono::weekday& y) noexcept;
(C++20 起)
constexpr bool operator!=(const std::chrono::weekday& x, const std::chrono::weekday& y) noexcept;
(C++20 起)

比较二个 std::chrono::weekday xy

返回值

1) unsigned(x) == unsigned(y)
2) unsigned(x) != unsigned(y)

注意

weekday 不支持 <<=>>= 运算符,因为在哪天是星期的首日上没有普遍的共识。