Created on 2019-09-02.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4830.
Modify [time.cal.wdidx.members] as indicated:
[Drafting note: As a drive-by fix a cleanup of "Constructs an object of type weekday_indexed" wording has been applied as well. ]
constexpr weekday_indexed(const chrono::weekday& wd, unsigned index) noexcept;-1- Effects:
Constructs an object of type weekday_indexed by initializingInitializes wd_ with wd and index_ with index. The values held are unspecified if !wd.ok() or index is not in the range [10,57].
[ 2019-09-24 Issue Prioritization ]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
On one hand, we say that if you try to construct a weekday_indexed with index 0, you get an unspecified index instead ([time.cal.wdidx.members]/p1),:
The values held are unspecified if !wd.ok() or index is not in the range [1, 5].
OTOH, we take pains to pin down year_month_weekday's conversion to sys_days when the index is zero ([time.cal.wdidx.members]/p19):
If index() is 0 the returned sys_days represents the date 7 days prior to the first weekday() of year()/month().
This is inconsistent. We should allow a slightly wider range (say, [0, 7], since you need at least 3 bits anyway to represent the 5 distinct valid values, and the 0 value referred to by [time.cal.wdidx.members]/p19.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2019-11-19 14:48:30 | admin | set | status: voting -> wp |
2019-10-07 02:48:00 | admin | set | status: ready -> voting |
2019-09-24 19:35:30 | admin | set | messages: + msg10668 |
2019-09-24 19:35:30 | admin | set | status: new -> ready |
2019-09-14 12:15:17 | admin | set | messages: + msg10607 |
2019-09-02 00:00:00 | admin | create |