std::chrono::year::max
來自 cppreference.com
static constexpr year max() noexcept; |
(C++20 起) | |
返回可能的最大 year
,即 std::chrono::year(32767)。
[編輯] 返回值
std::chrono::year(32767)
[編輯] 示例
執行此程式碼
#include <chrono> #include <iostream> int main() { std::cout << "The maximum year is: " << (int)std::chrono::year::max() << '\n'; }
輸出
The maximum year is: 32767