1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 03:43:53 +02:00
openwrt-packages/sound/mpd/patches/020-string-view.patch
Rosen Penev 9fcd8a4d4f mpd: update to 0.22.8
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-01 23:03:27 -07:00

26 lines
591 B
Diff

--- a/src/tag/GenParseName.cxx
+++ b/src/tag/GenParseName.cxx
@@ -21,7 +21,13 @@
#include <cstdlib>
#include <map>
+#if __has_include("<string_view>")
#include <string_view>
+using std::string_view;
+#else
+#include <boost/utility/string_view.hpp>
+using boost::string_view;
+#endif
#include <stdio.h>
@@ -41,7 +47,7 @@ main(int argc, char **argv)
FILE *out = fopen(argv[1], "w");
- std::map<std::string_view, TagType> names;
+ std::map<string_view, TagType> names;
for (unsigned i = 0; i < unsigned(TAG_NUM_OF_ITEM_TYPES); ++i)
names[tag_item_names[i]] = TagType(i);