1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/common/enum_class_hash.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include <cstddef>
12
13namespace duckdb {
14/* For compatibility with older C++ STL, an explicit hash class
15 is required for enums with C++ sets and maps */
16struct EnumClassHash {
17 template <typename T>
18 std::size_t operator()(T t) const {
19 return static_cast<std::size_t>(t);
20 }
21};
22} // namespace duckdb
23