std::chrono::month::operator++, std::chrono::month::operator--
提供: cppreference.com
<tbody>
</tbody>
constexpr std::chrono::month& operator++() noexcept; |
(1) | (C++20以上) |
constexpr std::chrono::month operator++(int) noexcept; |
(2) | (C++20以上) |
constexpr std::chrono::month& operator--() noexcept; |
(3) | (C++20以上) |
constexpr std::chrono::month operator--(int) noexcept; |
(4) | (C++20以上) |
月の値に1を加算または減算し、結果を12で割った剰余を取って範囲 [1, 12] の整数に縮小します。
1-2)
*this += std::chrono::months{1}; を行います。3-4)
*this -= std::chrono::months{1}; を行います。引数
(なし)
戻り値
1,3) 変更後のこの
month を指す参照2,4) 変更前の
month のコピーノート
これらの関数の呼び出しの後、 ok() は必ず true になります。
例
| This section is incomplete Reason: no example |
関連項目
| 月数を加算または減算します (パブリックメンバ関数) | |
month に対する算術演算を行います (関数) |