You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
835 B

--- 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);
@@ -61,7 +67,7 @@ main(int argc, char **argv)
char first = 0;
for (const auto &i : names) {
- const std::string_view name = i.first;
+ const string_view name = i.first;
const TagType tag = i.second;
if (name.front() != first) {