I had to do the following to be able to use string views to poke at
unordered maps with strings for their keys.
I was expecting to simply be able to use std::hash<void>, but gcc 11.2
was not happy. And I find no evidence of std::hash<void>'s existence on cppreference.com.
So, does it exist but not documented, and not implemented in gcc, or is
this a rather glaring hole in the standard.
If I can have std::equal_to<void>, I see no reason not to have std::hash<void>, instead of resorting to such hackery:
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 113 |
Nodes: | 8 (1 / 7) |
Uptime: | 06:07:19 |
Calls: | 2,497 |
Calls today: | 14 |
Files: | 8,644 |
Messages: | 1,902,088 |