Skip to content

<chrono>: chrono::abs incorrectly uses ?: with expressions that don't always have a common type - #2988

Merged
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
CaseyCarter:lwg-3741
Aug 5, 2022
Merged

Conversation

@CaseyCarter

Copy link
Copy Markdown
Contributor

...by avoiding ill-formed uses of the conditional operator in std::chrono::abs.

Fixes #2839

...by avoiding ill-formed uses of the conditional operator in `std::chrono::abs`.

Fixes microsoft#2839
@CaseyCarter Casey Carter (CaseyCarter) added the bug Something isn't working label Aug 3, 2022
@CaseyCarter
Casey Carter (CaseyCarter) requested a review from a team as a code owner August 3, 2022 19:32
@CaseyCarter Casey Carter (CaseyCarter) changed the title Fix the bug that we thought was LWG-3741 <chrono>: chrono::abs incorrectly uses ?: with expressions that don't always have a common type Aug 3, 2022
@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 1fe625d into microsoft:main Aug 5, 2022
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for investigating and fixing this bug in time itself! 🕥 😹 🎉

nicole mazzuca (strega-nil) pushed a commit to strega-nil/stl that referenced this pull request Aug 6, 2022
@CaseyCarter
Casey Carter (CaseyCarter) deleted the lwg-3741 branch August 9, 2022 16:48
Igor Zhukov (fsb4000) pushed a commit to fsb4000/STL that referenced this pull request Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chrono C++20 chrono

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<chrono>: abs(duration) requires a duration with reduced period

3 participants