1 #ifndef DBALLE_DB_V7_UTILS_H 2 #define DBALLE_DB_V7_UTILS_H 4 #include <unordered_set> 14 wreport::Varcode varcode;
16 IdVarcode(
int id, wreport::Varcode varcode) : id(
id), varcode(varcode) {}
20 return std::tie(
id, varcode) == std::tie(o.id, o.varcode);
24 return std::tie(
id, varcode) != std::tie(o.id, o.varcode);
28 return std::tie(
id, varcode) < std::tie(o.id, o.varcode);
32 return std::tie(
id, varcode) > std::tie(o.id, o.varcode);
41 template <>
struct hash<
dballe::db::v7::IdVarcode>
44 typedef std::size_t result_type;
47 result_type
const h1(std::hash<int>{}(s.id));
48 result_type
const h2(std::hash<wreport::Varcode>{}(s.varcode));
49 return h1 ^ (h2 << 1);