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

[unord.hash] Redundant wording LWG 3512 #4437

Closed
JohelEGP opened this issue Dec 28, 2020 · 3 comments · Fixed by #4438
Closed

[unord.hash] Redundant wording LWG 3512 #4437

JohelEGP opened this issue Dec 28, 2020 · 3 comments · Fixed by #4438
Labels
lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.

Comments

@JohelEGP
Copy link
Contributor

[unord.hash]p5.4 ends with "shall not throw an exception unless hash<Key> is a program-defined specialization that depends on at least one program-defined type."

"that depends on at least one program-defined type" is redundant given [namespace.std]p2: "Unless explicitly prohibited, a program may add a template specialization for any standard library class template to namespace std provided that (a) the added declaration depends on at least one program-defined type ..."

@jwakely
Copy link
Member

jwakely commented Dec 28, 2020

I agree those words are redundant, but is that wording even true? If the hash function is hash<optional<T>> then it's not a program-defined specialization, but it can throw if hash<T> can throw.

Rather than fixing the redundancy as an editorial issue, we need to fix the falsehood as an LWG issue.

@JohelEGP
Copy link
Contributor Author

You're right. Fortunately, the redundant part comes after the falsehood part.

@Dani-Hub
Copy link
Member

A corresponding LWG issue exists now: LWG 3512

@jensmaurer jensmaurer changed the title [unord.hash] Redundant wording [unord.hash] Redundant wording LWG 3512 Jan 21, 2021
@jensmaurer jensmaurer added lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. labels Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants