Namespaces
Variants

std::chrono::year:: max

From cppreference.net
static constexpr year max ( ) noexcept ;
(depuis C++20)

Retourne la plus grande valeur possible pour year , c'est-à-dire std:: chrono :: year ( 32767 ) .

Valeur de retour

std:: chrono :: year ( 32767 )

Exemple

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

Sortie :

The maximum year is: 32767