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-() noexcept; |
(2) | (C++20以上) |
年の値に単項演算子を適用します。
1)
*this のコピーを返します。2)
*this の年の値の反数の年の値を持つ year を返します。戻り値
1)
*this2)
std::chrono::year(-int(*this))例
| This section is incomplete Reason: no example |