This is an archive of the discontinued LLVM Phabricator instance.

Implement the `sys_time` portions of the C++20 calendaring stuff
ClosedPublic

Authored by mclow.lists on Jan 9 2019, 8:00 AM.

Details

Reviewers
EricWF
ldionne
Summary

Add the types sys_time, sys_days and sys_seconds, and add support for them to all the classes that need it.

Un-XFAIL a bunch of tests now that they should pass.

Diff Detail

Event Timeline

mclow.lists created this revision.Jan 9 2019, 8:00 AM

Added support for local_time in the calculations as well.

ldionne accepted this revision.Jan 10 2019, 12:55 PM

I've only had time to do a cursory review, but LGTM so far.

include/chrono
2431

Mostly a nitpick, but I would find this clearer:

month() == February && __y.is_leap() ? chrono::day{29} : __d[static_cast<unsigned>(month()) - 1]
This revision is now accepted and ready to land.Jan 10 2019, 12:55 PM
mclow.lists closed this revision.Jan 11 2019, 7:56 AM
mclow.lists marked an inline comment as done.

Committed as revision 350929

test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp