summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/string_view.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/string_view.h')
-rw-r--r--apt-pkg/contrib/string_view.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h
index 536744e32..f4f0c645f 100644
--- a/apt-pkg/contrib/string_view.h
+++ b/apt-pkg/contrib/string_view.h
@@ -9,7 +9,7 @@
* (at your option) any later version.
*/
-#if !defined(APT_STRINGVIEW_H) && defined(APT_PKG_EXPOSE_STRING_VIEW)
+#if !defined(APT_STRINGVIEW_H)
#define APT_STRINGVIEW_H
#include <apt-pkg/macros.h>
#include <string>
@@ -24,7 +24,7 @@ namespace APT {
* used by APT. It is not meant to be used in programs, only inside the
* library for performance critical paths.
*/
-class APT_HIDDEN StringView {
+class StringView {
const char *data_;
size_t size_;
@@ -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