Namespaces
Variants

std::chrono::year:: max

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

Gibt den größtmöglichen year zurück, also std:: chrono :: year ( 32767 ) .

Rückgabewert

std:: chrono :: year ( 32767 )

Beispiel

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

Ausgabe:

The maximum year is: 32767