std::chrono::year:: max
From cppreference.net
C++
Date and time library
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::chrono::year
| Member functions | ||||
|
year::max
|
||||
| Nonmember functions | ||||
| Helper classes | ||||
|
(C++26)
|
|
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