You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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 ..."
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.
Activity
jwakely commentedon 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 ifhash<T>can throw.Rather than fixing the redundancy as an editorial issue, we need to fix the falsehood as an LWG issue.
JohelEGP commentedon Dec 28, 2020
You're right. Fortunately, the redundant part comes after the falsehood part.
Dani-Hub commentedon Jan 16, 2021
A corresponding LWG issue exists now: LWG 3512
[-][unord.hash] Redundant wording[/-][+][unord.hash] Redundant wording LWG 3512[/+]