std::chrono::weekday::operator+=, std::chrono::weekday::operator-=
提供: cppreference.com
constexpr std::chrono::weekday& operator+=(const std::chrono::days& d) noexcept; |
(1) | (C++20以上) |
constexpr std::chrono::weekday& operator-=(const std::chrono::days& d) noexcept; |
(2) | (C++20以上) |
曜日の値に d.count()
を加算または減算し、結果を7で割った剰余を取って範囲 [0, 6] の整数に縮小します。
1) *this = *this + d; を行います。
2) *this = *this - d; を行います。
目次 |
[編集] 戻り値
変更後のこの weekday
を指す参照。
[編集] ノート
演算中にオーバーフローが発生しなければ、これらの関数の呼び出しの後、 ok() は必ず true になります。
[編集] 例
This section is incomplete Reason: no example |
[編集] 関連項目
曜日をインクリメントまたはデクリメントします (パブリックメンバ関数) | |
weekday に対する算術演算を行います (関数) |