命名空间
变体
操作

std::chrono::year::min

来自 cppreference.cn
< cpp‎ | chrono‎ | year
 
 
 
 
static constexpr std::chrono::year min() noexcept;
(自 C++20 起)

返回最小可能的 year,即 std::chrono::year(-32767)

[编辑] 返回值

std::chrono::year(-32767)

[编辑] 示例

#include <chrono>
#include <iostream>
 
int main()
{
    std::cout << "The minimum year is: " << (int)std::chrono::year::min() << '\n';
}

输出

The minimum year is: -32767