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