std::chrono::year::operator++, std::chrono::year::operator--
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] 外,则实际存储值未指定。
示例
本节未完成 原因:暂无示例 |
参阅
从 year 加上或减去年数(公开成员函数) |
|
(C++20)
|
进行 year 上的算术(函数) |