KEMBAR78
Use the `_Transparent` concept and remove `_Is_transparent` by frederick-vs-ja · Pull Request #5498 · microsoft/STL · GitHub
Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

#3736 added _Is_transparent and _Transparent but didn't use them.

I think it's time to use the _Transparent concept for C++20-and-later-only code. And it seems less burdensome for compilers if _Is_transparent_v is changed to be implemented with a concept. After the changes, _Is_transparent_v will be only necessary for <xtree>, so this PR moves _Is_transparent_v to that header.

<flat_map> and <flat_set> will be changed in another PR.

Theoretically, _Is_transparent would be useful in the cases where conjunction(_v) or disjunction(_v) is used. But I think there won't be such a case in MSVC STL - for new code it's probably better to use requires-clauses, and the uses of _Is_transparent_v in <xtree> seem stable enough. So I decide to remove it.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner May 12, 2025 07:08
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews May 12, 2025
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label May 12, 2025
@StephanTLavavej StephanTLavavej self-assigned this May 12, 2025
@StephanTLavavej StephanTLavavej removed their assignment May 12, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews May 12, 2025
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews May 16, 2025
@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 c6c64d3 into microsoft:main May 17, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews May 17, 2025
@StephanTLavavej
Copy link
Member

🪟 👓 🧊

@frederick-vs-ja frederick-vs-ja deleted the transparent-concept branch May 18, 2025 07:47
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.

2 participants