File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 2626#include " iceberg/type.h"
2727#include " iceberg/util/formatter.h" // IWYU pragma: keep
2828#include " iceberg/util/macros.h"
29- #include " iceberg/util/string_utils.h"
3029#include " iceberg/util/visit_type.h"
3130
3231namespace iceberg {
Original file line number Diff line number Diff line change 3232#include " iceberg/result.h"
3333#include " iceberg/schema_field.h"
3434#include " iceberg/type.h"
35+ #include " iceberg/util/string_utils.h"
3536
3637namespace iceberg {
3738
38- // / \brief Transparent hash function that supports std::string_view as lookup key
39- // /
40- // / Enables std::unordered_map to directly accept std::string_view lookup keys
41- // / without creating temporary std::string objects, using C++20's transparent lookup.
42- struct string_hash {
43- using hash_type = std::hash<std::string_view>;
44- using is_transparent = void ;
45-
46- std::size_t operator ()(std::string_view str) const { return hash_type{}(str); }
47- };
48-
4939// / \brief A schema for a Table.
5040// /
5141// / A schema is a list of typed columns, along with a unique integer ID. A
Original file line number Diff line number Diff line change @@ -46,4 +46,15 @@ class ICEBERG_EXPORT StringUtils {
4646 }
4747};
4848
49+ // / \brief Transparent hash function that supports std::string_view as lookup key
50+ // /
51+ // / Enables std::unordered_map to directly accept std::string_view lookup keys
52+ // / without creating temporary std::string objects, using C++20's transparent lookup.
53+ struct string_hash {
54+ using hash_type = std::hash<std::string_view>;
55+ using is_transparent = void ;
56+
57+ std::size_t operator ()(std::string_view str) const { return hash_type{}(str); }
58+ };
59+
4960} // namespace iceberg
You can’t perform that action at this time.
0 commit comments