summaryrefslogtreecommitdiff
path: root/zen/string_base.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-02-21 12:13:36 -0500
committerB. Stack <bgstack15@gmail.com>2023-02-21 12:13:36 -0500
commit5a6ed4e8eadf3af3d141b246f124d67b62a1357c (patch)
tree4e49ae80efbe181c46110867fe7cf703efd3fcf5 /zen/string_base.h
parentargon2 copyright notice updated (diff)
downloadFreeFileSync-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.h15
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
bgstack15