summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-14 17:40:13 +0100
committerнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-14 18:24:32 +0100
commit0cc32385f109705aac51e354d854833d6203f773 (patch)
treeb7b3c93cf4238cb055c102c1a26233414fc59d22 /apt-pkg
parentc2c98b6e251d221faea879058aa0e92436048e76 (diff)
if APT_PKG_ABI > 600: using APT::StringView = std::string_view;
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/string_view.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h
index 34a8e8a95..6224e2ac4 100644
--- a/apt-pkg/contrib/string_view.h
+++ b/apt-pkg/contrib/string_view.h
@@ -15,6 +15,11 @@
#include <cstring>
#include <string>
+#if APT_PKG_ABI > 600
+namespace APT {
+using StringView = std::string_view;
+}
+#else
namespace APT {
/**
@@ -157,5 +162,6 @@ inline bool operator ==(const char *other, APT::StringView that) { return that.o
template<class = void> bool operator ==(std::string_view const &other, APT::StringView const &that) { return that.operator==(other); }
template<class = void> bool operator !=(std::string_view const &other, APT::StringView const &that) { return that.operator!=(other); }
template<class = void> bool operator !=(APT::StringView const &that, std::string_view const &other) { return that.operator!=(other); }
+#endif
#endif