diff options
Diffstat (limited to 'minicc.h')
-rw-r--r-- | minicc.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -34,3 +34,12 @@ struct Token { // For printing via Google Test bool operator==(const Token &a, const Token &b); std::ostream& operator<<(std::ostream& os, const Token& token); + +struct PairHashSS { + size_t operator()(const std::pair<std::string,std::string>& p) const noexcept + { + size_t h0 {std::hash<std::string>{}(p.first)}; + size_t h1 {std::hash<std::string>{}(p.second)}; + return h0 ^ (h1 << 1); + } +}; |