std::chrono::day::operator+=, std::chrono::day::operator-=
constexpr day& operator+=(const std::chrono::days& d) noexcept;
|
(1) | (C++20 起) |
constexpr day& operator-=(const std::chrono::days& d) noexcept;
|
(2) | (C++20 起) |
从日期值加或减 d.count() 日。
1) 等价于 *this = *this + d;
2) 等价于 *this = *this - d;
返回值
到修改后的此 day
的引用
注意
若结果会在范围 [0, 255] 外,则实际存储值未指定。
示例
参阅
自增或自减 day (公开成员函数) |
|
(C++20)
|
加或减日数和 day ,或求二个 day 间的差(函数) |