|
SILICON
|
Transparent hash functor for string-like keys. More...
#include <transparent_string.hpp>
Public Types | |
| using | is_transparent = void |
Public Member Functions | |
| std::size_t | operator() (std::string_view value) const noexcept |
| std::size_t | operator() (const std::string &value) const noexcept |
| std::size_t | operator() (const char *value) const noexcept |
Transparent hash functor for string-like keys.
This helper enables heterogeneous lookup in associative containers keyed by std::string. With it, callers can search the container using std::string_view, std::string, or string literals without first building a temporary std::string.
Typical use: std::unordered_map<std::string, T, TransparentStringHash, TransparentStringEqual>
The is_transparent marker is what tells the standard library that the hash supports mixed lookup key types.
Definition at line 40 of file transparent_string.hpp.
| using is_transparent = void |
Definition at line 41 of file transparent_string.hpp.
|
inlinenodiscardnoexcept |
Definition at line 53 of file transparent_string.hpp.
|
inlinenodiscardnoexcept |
Definition at line 48 of file transparent_string.hpp.
|
inlinenodiscardnoexcept |
Definition at line 43 of file transparent_string.hpp.