summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-02-04 20:35:07 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2019-06-11 14:45:55 +0200
commitfc7d9b53f201bfdc5b3955394e6609ed7dadd258 (patch)
tree953896e873bd6e75ece8d8ddc6770699174d836f
parenta6e86d51a0e32cdc91f2902b0d6b483af884dcca (diff)
Allow comparing string to StringView
-rw-r--r--apt-pkg/contrib/string_view.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h
index 443ea395e..f4f0c645f 100644
--- a/apt-pkg/contrib/string_view.h
+++ b/apt-pkg/contrib/string_view.h
@@ -128,5 +128,7 @@ static inline int StringViewCompareFast(StringView a, StringView b) {
inline bool operator ==(const char *other, APT::StringView that);
inline bool operator ==(const char *other, APT::StringView that) { return that.operator==(other); }
+inline bool operator ==(std::string const &other, APT::StringView that);
+inline bool operator ==(std::string const &other, APT::StringView that) { return that.operator==(other); }
#endif