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

<xhash>: Get rid of tricks for transparent overloads of hash containers #5208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
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
Status: Initial Review
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