std::chrono::year::operator++, std::chrono::year::operator--
提供: cppreference.com
<tbody>
</tbody>
constexpr std::chrono::year& operator++() noexcept; |
(1) | (C++20以上) |
constexpr std::chrono::year operator++(int) noexcept; |
(2) | (C++20以上) |
constexpr std::chrono::year& operator--() noexcept; |
(3) | (C++20以上) |
constexpr std::chrono::year operator--(int) noexcept; |
(4) | (C++20以上) |
年の値に1を加算または減算します。
1-2)
*this += std::chrono::years{1}; を行います。3-4)
*this -= std::chrono::years{1}; を行います。引数
(なし)
戻り値
1,3) 変更後のこの
year を指す参照。2,4) 変更前の
year のコピー。ノート
結果が [-32767, 32767] の範囲外の場合、実際に格納される値は未規定です。
例
| This section is incomplete Reason: no example |
関連項目
year に年数を加算または減算します (パブリックメンバ関数) | |
year に対する算術演算を行います (パブリックメンバ関数) |