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

Use requires-clauses and concepts for miscellaneous C++20/23 components #4637

Merged

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Apr 27, 2024

Notes:

  • Helper concepts are introduced to avoid constraints mismatch in forward declarations.
  • is_same_v is not replaced with same_as since the latter checks twice.
  • Containers, tuple, pair, and zoned_time are not yet touched. I think they should handled in concentrated following-up PRs.

MSVC is buggy on detection of forming an invalid reference type to a cv-/ref-qualified function type in a requires-expression. Reported DevCom-10648215.

Towards #602.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner April 27, 2024 15:46
@frederick-vs-ja frederick-vs-ja changed the title Use requires-clause for miscellaneous C++20/23 components Use requires-clauses and concepts for miscellaneous C++20/23 components Apr 27, 2024
Notes:
- Helper concepts are introduced to avoid constraints mismatch.
- `is_same_v` is not replaced with `same_as` since the latter checks
twice.
- Containers, `tuple`, `pair`, and `zoned_time` are not yet touched.
I think they should handled in concentrated following-up PRs.
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Apr 27, 2024
@StephanTLavavej StephanTLavavej self-assigned this Apr 27, 2024
@StephanTLavavej
Copy link
Member

Thanks for the extremely careful work here - this is an excellent improvement and significantly improves readability! 😻

@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej merged commit 23344e2 into microsoft:main May 20, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks again for these awesome simplifications! 😸 🪄 🎉

@frederick-vs-ja frederick-vs-ja deleted the requires-for-misc-cxx20 branch May 20, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants