--- a/src/tag/GenParseName.cxx +++ b/src/tag/GenParseName.cxx @@ -21,7 +21,13 @@ #include #include +#if __has_include("") #include +using std::string_view; +#else +#include +using boost::string_view; +#endif #include @@ -41,7 +47,7 @@ main(int argc, char **argv) FILE *out = fopen(argv[1], "w"); - std::map names; + std::map 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) {