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