KEMBAR78
`<xhash>`: Get rid of tricks for transparent overloads of hash containers by frederick-vs-ja · Pull Request #5208 · microsoft/STL · GitHub
Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

This PR removes overload-merging tricks (which supports implementing WG21-P1690R1) for hash containers by re-implementing the shapes of the involved functions as specified in standard. Currently, the trick is buggy when the transparent overloads are enabled and the arguments are brace initializer lists (see DevCom-10819520).

Another approach can be changing the default template argument from void to key_type. However, this would make more bogus uses accepted, although it might be still conforming. I guess the safest way is "Do What The Standard Says" here.

Fixes #5207.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner December 27, 2024 11:46
@frederick-vs-ja frederick-vs-ja force-pushed the transparent-hash-containers-no-trick branch from ffce9d1 to 318ba54 Compare December 27, 2024 12:28
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Jan 4, 2025
@StephanTLavavej StephanTLavavej self-assigned this Jan 4, 2025
@StephanTLavavej StephanTLavavej added bug Something isn't working and removed enhancement Something can be improved labels Jan 8, 2025
@StephanTLavavej StephanTLavavej removed their assignment Jan 10, 2025
@StephanTLavavej
Copy link
Member

Thanks, this makes a lot more sense than the old wacky scheme! 😻 I pushed a trivial change to fuse regions.

@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 313e1f4 into microsoft:main Jan 14, 2025
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks for properly constraining these member functions! 🎉 🥳 😸

@frederick-vs-ja frederick-vs-ja deleted the transparent-hash-containers-no-trick branch January 14, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

<xhash>: Some member functions of transparent hash containers fail to work with initializer lists

2 participants