summaryrefslogtreecommitdiff
path: root/external/zxing/assume.__cpp_lib_string_view.patch.0
blob: 24593aa569467b41393e002327395bd111c7de0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- ./core/src/ByteArray.h	2022-12-05 10:05:07.330193204 +0000
+++ ./core/src/ByteArray.h	2022-12-05 10:05:13.897892011 +0000
@@ -11,9 +11,7 @@
 #include <string>
 #include <vector>
 
-#ifdef __cpp_lib_string_view
 #include <string_view>
-#endif
 
 namespace ZXing {
 
@@ -30,12 +28,10 @@
 
 	void append(const ByteArray& other) { insert(end(), other.begin(), other.end()); }
 
-#ifdef __cpp_lib_string_view
 	std::string_view asString(size_t pos = 0, size_t len = std::string_view::npos) const
 	{
 		return std::string_view(reinterpret_cast<const char*>(data()), size()).substr(pos, len);
 	}
-#endif
 };
 
 inline std::string ToHex(const ByteArray& bytes)