<chrono>
formatting: weekday_last
, month_weekday
, month_weekday_last
#1854
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
weekday_last
,month_weekday
,month_weekday_last
._Fill_tm()
:weekday_indexed
andweekday_last
can share code.month_weekday
andmonth_weekday_last
have different accessors.year_month_weekday
andyear_month_weekday_last
._Is_valid_type()
:weekday
,weekday_indexed
, andweekday_last
all support the "weekday types".month_weekday
andmonth_weekday_last
support "month types" and "weekday types". (As mentioned above, their accessors are actuallyweekday_indexed()
andweekday_last()
, but it seemed pointless to have separate cases to "recurse" into theweekday_indexed
andweekday_last
types, when the answer is always the same.)static_assert
to"should be unreachable"
, which is the pattern that we use elsewhere._Fill_tm_formatter
.P0355R7_calendars_and_time_zones_formatting/test.cpp
:charT
toCharT
for consistency (this is needed by theSTR
macro, if it were ever used in these functions).empty_braces_helper()
to test bothformat("{}")
andoperator<<
. This should supersedestream_helper()
but I'm not making that change here.year_month_day_last
,year_month_weekday
, andyear_month_weekday_last
now that the necessary formatters are available.