CppDS.com

C++ 98 11 14 17 20 手册

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

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

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

返回值

1) int(x) == int(y)
2) int(x) <=> int(y)
关闭