1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/common/string_map_set.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/common/types.hpp"
12#include "duckdb/common/unordered_map.hpp"
13#include "duckdb/common/unordered_set.hpp"
14
15namespace duckdb {
16
17struct PerfectHash {
18 inline std::size_t operator()(const idx_t &h) const {
19 return h;
20 }
21};
22
23struct PerfectEquality {
24 inline bool operator()(const idx_t &a, const idx_t &b) const {
25 return a == b;
26 }
27};
28
29template <typename T>
30using perfect_map_t = unordered_map<idx_t, T, PerfectHash, PerfectEquality>;
31
32using perfect_set_t = unordered_set<idx_t, PerfectHash, PerfectEquality>;
33
34} // namespace duckdb
35