TransparentStringHasher#
Fully qualified name: carb::container::TransparentStringHasher
Defined in carb/container/Transparency.h
-
struct TransparentStringHasher : public std::equal_to<void>#
String hasher that supports transparency.
A string comparator for unordered maps, sets and any other containers that work based on a Hasher that use a string as a key (omni::string, std::string, carb::RString) and are transparently comparable with
const char*or anything that can be used to construct a carb::cpp::string_view.Public Types
-
using is_transparent = void#
Declaration of transparency support.
Public Functions
-
inline size_t operator()(cpp::string_view sv) const#
Hash for carb::cpp::string_view.
- Parameters:
sv – The string view
- Returns:
Hash value for the string view.
-
inline size_t operator()(const char *p) const#
Hash for a raw C string. Treats
nullptras an empty string.- Parameters:
p – The raw C string.
- Returns:
Hash value for the string view.
-
using is_transparent = void#