Closed tomaszkam closed 5 years ago
Discussion:
The current specification of the year_month_day
conversion operator to sys_days
, uses to the day
method on the sys_days
, that does not exist.
In [ymd.members] p18, the expression sysdays{y/m/last}.day()
is ill-formed:
Otherwise, if y.ok() && m.ok()
is true, returns a sysdays which is offset from sysdays{y/m/last}
by the number of days d
is offset from sysdays{y/m_/last}.day()
.`
Proposed wording:
Apply following changes to year_month_day::operator sys_days
in [ymd.members]:
constexpr operator sys_days() const noexcept;
Returns: If ok()
, returns a sysdays
holding a count of days from the sysdays
epoch to this
(a negative value if this
represents a date prior to the sysdays epoch).
Otherwise, if y
.ok() && m.ok() is true, returns sys
days{y/m/1d} + (d - 1d)a days which is offset from sys
sysdays{y/m/last}
by the number of days d
is offset from sysdays{y/m_/last}.day()
.
Otherwise the value returned is unspecified.
Original comment: