diff options
author | B. Stack <bgstack15@gmail.com> | 2023-02-21 12:13:36 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-02-21 12:13:36 -0500 |
commit | 5a6ed4e8eadf3af3d141b246f124d67b62a1357c (patch) | |
tree | 4e49ae80efbe181c46110867fe7cf703efd3fcf5 /zen/string_base.h | |
parent | argon2 copyright notice updated (diff) | |
download | FreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.tar.gz FreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.tar.bz2 FreeFileSync-5a6ed4e8eadf3af3d141b246f124d67b62a1357c.zip |
add upstream 12.112.1
Diffstat (limited to 'zen/string_base.h')
-rw-r--r-- | zen/string_base.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/zen/string_base.h b/zen/string_base.h index 98544ab3..b19b4851 100644 --- a/zen/string_base.h +++ b/zen/string_base.h @@ -663,7 +663,20 @@ void Zbase<Char, SP>::pop_back() template <class Char, template <class> class SP> struct std::hash<zen::Zbase<Char, SP>> { - size_t operator()(const zen::Zbase<Char, SP>& str) const { return zen::hashString<size_t>(str); } + using is_transparent = int; //allow heterogenous lookup! + + template <class String> + size_t operator()(const String& str) const { return zen::hashString<size_t>(str); } +}; + + +template <class Char, template <class> class SP> +struct std::equal_to<zen::Zbase<Char, SP>> +{ + using is_transparent = int; //enable heterogenous lookup! + + template <class String1, class String2> + bool operator()(const String1& lhs, const String2& rhs) const { return zen::equalString(lhs, rhs); } }; #endif //STRING_BASE_H_083217454562342526 |