<chrono> Partially implement P0355R7 #323
Merged
StephanTLavavej merged 159 commits intomicrosoft:mainfrom Feb 1, 2021
Merged
Conversation
Contributor
Author
|
Maybe I should have squashed the commits 👀 Edit: decided to squash them as they added a lot of noise to the conversation. Surprised GitHub doesn't collapse them or something. |
barcharcraz
reviewed
Apr 1, 2020
SuperWig
commented
Apr 4, 2020
tests/std/tests/P0355R7_calendars_and_time_zones_dates/test.cpp
Outdated
Show resolved
Hide resolved
SuperWig
commented
Apr 4, 2020
tests/std/tests/P0355R7_calendars_and_time_zones_dates/test.cpp
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
StephanTLavavej
approved these changes
Jan 29, 2021
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This reverts commit 72b2583. Already tested by P0355R7_calendars_and_time_zones_dates_literals.
StephanTLavavej
approved these changes
Jan 29, 2021
Member
|
Thanks for implementing a huge part of this huge C++20 feature, and for enduring over a year (!!!) of review! 😻 📅 📆 🚀 🎉 |
Contributor
Author
|
And thanks for enduring my sometimes questionable code 😅. One thing though, is this one not an "issue"? #323 (comment) |
Member
|
Thanks, missed that outstanding issue - basically, we're not super duper disciplined about our |
This was referenced Mar 1, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Partially implemented #12;
[time.point.arithmetic] and [time.cal] (excluding I/O)
I've used a couple of Howard's algorithms, which I hope is okay as it's public domain
I originally used Howard's algorithm forI did eventually realise this was just a result of poor reading comprehension on my end.year_month_day::operator sys_days()but I just saw LWG3206 in the issue thread and switched to it however it broke my test project's uses ofconstexprdue to the depth limit.Speaking of
constexprI had to disable the warning for negative integral => unsigned as uses of it in constexpr contexts fail to compile. No idea if that was the correct thing to do.There is more than likely a better way of doing
year_month_weekday::operator sys_days() constthan how I implemented it. edit: I believe I've improved this.During testing I found that this code triggers an ICE
I think everything should be
noexcept /* strengthened */? If so are they applied to declarations, definitions, or both?Checklist
Be sure you've read README.md and understand the scope of this repo.
If you're unsure about a box, leave it unchecked. A maintainer will help you.
_Uglyas perhttps://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
verified by an STL maintainer before automated testing is enabled on GitHub,
leave this unchecked for initial submission).
members, adding virtual functions, changing whether a type is an aggregate
or trivially copyable, etc.).
the C++ Working Draft (including any cited standards), other WG21 papers
(excluding reference implementations outside of proposed standard wording),
and LWG issues as reference material. If they were derived from a project
that's already listed in NOTICE.txt, that's fine, but please mention it.
If they were derived from any other project (including Boost and libc++,
which are not yet listed in NOTICE.txt), you must mention it here,
so we can determine whether the license is compatible and what else needs
to be done.