|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
year::max | ||||
| Nonmember functions | ||||
| Helper classes | ||||
(C++26) |
staticconstexpr year max()noexcept; | (since C++20) | |
Returns the largest possibleyear, that is,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';}
Output:
The maximum year is: 32767