Created on 2016-05-03.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N4582.
Edit [system_error.syn], header <system_error> synopsis, as indicated:
namespace std { // ... // 19.5.6 Hash support template<class T> struct hash; template<> struct hash<error_code>; template<> struct hash<error_condition>; // ... }
Edit [syserr.hash] as indicated:
template <> struct hash<error_code>; template <> struct hash<error_condition>;-1- The template specializations shall meet the requirements of class template hash (20.12.14).
[ 2016-08 - Chicago ]
Thurs AM: Moved to Tentatively Ready
Both error_code and error_condition have an operator< overload, enabling their use in associative containers without having to write a custom comparator.
However, only error_code has a std::hash specialization. So it's possible to have a set<error_code>, a set<error_condition>, an unordered_set<error_code>, but not an unordered_set<error_condition>. This seems...odd.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-11-14 03:59:28 | admin | set | status: pending -> wp |
2016-11-14 03:55:22 | admin | set | status: ready -> pending |
2016-08-05 03:33:05 | admin | set | messages: + msg8417 |
2016-08-05 03:33:05 | admin | set | status: new -> ready |
2016-05-03 17:13:53 | admin | set | messages: + msg8069 |
2016-05-03 00:00:00 | admin | create |