// Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_PREFS_TRANSPARENT_UNORDERED_STRING_MAP_H_ #define COMPONENTS_PREFS_TRANSPARENT_UNORDERED_STRING_MAP_H_ #include #include #include #include namespace internal { struct StringViewHasher : public std::hash { using is_transparent = void; }; } // namespace internal // A `std::unordered_map` from `std::string` to `ValueType` that allows // copy-less find for `std::string_view`. template using TransparentUnorderedStringMap = std::unordered_map>; #endif // COMPONENTS_PREFS_TRANSPARENT_UNORDERED_STRING_MAP_H_