Section: 126.96.36.199 [time.cal.ym.nonmembers] Status: C++20 Submitter: Tomasz Kamiński Opened: 2019-06-16 Last modified: 2021-02-25 10:48:01 UTC
View all issues with C++20 status.
The current specification of the addition of
months does not define a unique result value.
year(2018)/month(13)are valid results of
year(2018)/month(12) + months(1)addition, according to the spec in 188.8.131.52 [time.cal.ym.nonmembers].
[2019-06-24; LWG discussion]
During discussions on the LWG reflector there was a preference to add "is true" at the end of the modified Returns: element. This additional edit has been applied to Tomasz' original wording below.
[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
This wording is relative to N4810.
Modify 184.108.40.206 [time.cal.ym.nonmembers] as indicated:
constexpr year_month operator+(const year_month& ym, const months& dm) noexcept;
-3- Returns: A year_month value z such that z - ym == dm .Complexity: 𝒪(1) with respect to the value of dm.