Created on 2008-06-05.00:00:00 last changed 171 months ago
Proposed resolution:
Add the following to the synopsis in [function.objects]/2:
template<class Allocator> struct hash<std::vector<bool,Allocator>>; template<size_t N> struct hash<std::bitset<N>>;
Modify the last sentence of [unord.hash]/1 to end with:
... and std::string, std::u16string, std::u32string, std::wstring, std::error_code, std::thread::id, std::bitset, and std::vector<bool>.
In the current working draft, std::hash<T> is specialized for builtin types and a few other types. Bitsets seems like one that is missing from the list, not because it cannot not be done by the user, but because it is hard or impossible to write an efficient implementation that works on 32bit/64bit chunks at a time. For example, std::bitset is too much encapsulated in this respect.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg4039 |
2008-06-05 00:00:00 | admin | create |