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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h
index f4f0c645f..05aad3327 100644
--- a/apt-pkg/contrib/string_view.h
+++ b/apt-pkg/contrib/string_view.h
@@ -123,7 +123,10 @@ static inline int StringViewCompareFast(StringView a, StringView b) {
return memcmp(a.data(), b.data(), a.size());
}
-
+static constexpr inline APT::StringView operator""_sv(const char *data, size_t size)
+{
+ return APT::StringView(data, size);
+}
}
inline bool operator ==(const char *other, APT::StringView that);