From fc7d9b53f201bfdc5b3955394e6609ed7dadd258 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 4 Feb 2019 20:35:07 +0100 Subject: Allow comparing string to StringView --- apt-pkg/contrib/string_view.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/contrib') 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 -- cgit v1.2.3