Namespaces
Variants

std::chrono::year:: max

From cppreference.net
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