Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<chrono>: Implement exception class constructors #1849

Merged
merged 4 commits into from
Apr 17, 2021

Conversation

StephanTLavavej
Copy link
Member

  • @statementreply noticed that hh_mm_ss::hours() is already an absolute value.
  • Implement and test nonexistent_local_time and ambiguous_local_time (with a non-concepts placeholder).
    • The only difference from the Standardese is that I'm returning _STD move(_Os).str() as I believe it's equivalent and hopefully more efficient.
  • Fix P0355R7_calendars_and_time_zones_time_zones.
    • We can't use floating-point durations because the exception constructors in [time.zone.exception] will stream local_time<Duration>, and [time.clock.local] implements that by streaming sys_time<Duration>, and that's constrained by [time.clock.system.nonmembers] to reject floating-point durations.

StephanTLavavej and others added 4 commits April 17, 2021 00:47
Co-authored-by: statementreply <statementreply@gmail.com>
We can't use floating-point durations because the exception
constructors in [time.zone.exception] will stream local_time<Duration>,
and [time.clock.local] implements that by streaming sys_time<Duration>,
and that's constrained by [time.clock.system.nonmembers]
to reject floating-point durations.
@StephanTLavavej StephanTLavavej added cxx20 C++20 feature chrono C++20 chrono labels Apr 17, 2021
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner April 17, 2021 09:13
@StephanTLavavej StephanTLavavej merged commit d718499 into microsoft:chronat2 Apr 17, 2021
@SuperWig
Copy link
Contributor

😱 merging without another maintainer approval.

... Wait, wasn't 2 hours ago pretty early in the morning for you?

@StephanTLavavej
Copy link
Member Author

@SuperWig (catching up on my notifications) Yeah, chronat2 was a very fast-moving feature branch, no approvals needed. (We still had normal reviews before merging into main.)

I'm currently on Pacific Vampire Time, so 2:47 AM is late evening for me 🧛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chrono C++20 chrono cxx20 C++20 feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants