std::chrono::year::max
来自 cppreference.cn
static constexpr year max() noexcept; |
(since 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