Skip to content

Implement LWG-3574 and LWG-3595: common_iterator should be completely constexpr-able - #2410

Merged
Stephan T. Lavavej (StephanTLavavej) merged 9 commits into
microsoft:mainfrom
fsb4000:fix2397
Dec 17, 2021
Merged

Implement LWG-3574 and LWG-3595: common_iterator should be completely constexpr-able#2410
Stephan T. Lavavej (StephanTLavavej) merged 9 commits into
microsoft:mainfrom
fsb4000:fix2397

Conversation

@fsb4000

@fsb4000 Igor Zhukov (fsb4000) commented Dec 12, 2021

Copy link
Copy Markdown
Contributor

Fixes #2397

Fixes #2264

@fsb4000
Igor Zhukov (fsb4000) requested a review from a team as a code owner December 12, 2021 13:14
@CaseyCarter Casey Carter (CaseyCarter) added LWG Library Working Group issue ranges C++20/23 ranges labels Dec 12, 2021
Comment thread stl/inc/iterator
Comment thread stl/inc/iterator Outdated
Comment thread stl/inc/iterator
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks! I added a missing constexpr and test coverage to verify it. (Had to modify poor_sentinel since we need a non-trivial copy ctor to activate the codepath.)

@fsb4000 Igor Zhukov (fsb4000) changed the title Implement LWG-3574: common_iterator should be completely constexpr-able Implement LWG-3574 and 3595: common_iterator should be completely constexpr-able Dec 14, 2021
@CaseyCarter

Copy link
Copy Markdown
Contributor

I am pretty sure we do not use constexpr on defaulted SMF

When the Working Draft says constexpr (even when it doesn't matter) we repeat it (for consistency).

Comment thread stl/inc/iterator Outdated
Comment thread tests/std/tests/P0896R4_common_iterator/test.cpp Outdated
Comment thread tests/std/tests/P0896R4_common_iterator/test.cpp Outdated
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) changed the title Implement LWG-3574 and 3595: common_iterator should be completely constexpr-able Implement LWG-3574 and LWG-3595: common_iterator should be completely constexpr-able Dec 15, 2021
Comment thread tests/std/tests/P0896R4_common_iterator/test.cpp Outdated
Test constexpr copy construction with a stored sentinel whose copy constructor is constexpr but not trivial
@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 4db457f into microsoft:main Dec 17, 2021
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for implementing a fourth and fifth LWG issue resolution in today's batch! 🤯 💥 😻

@fsb4000
Igor Zhukov (fsb4000) deleted the fix2397 branch December 17, 2021 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LWG Library Working Group issue ranges C++20/23 ranges

Projects

None yet

5 participants