diff --git a/src/util/string.h b/src/util/string.h index fd0255d1625..b2be2e7f644 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -117,7 +117,7 @@ void ReplaceAll(std::string& in_out, std::string_view search, std::string_view s * - 3) */ template > -std::vector Split(const std::span& sp, std::string_view separators, bool include_sep = false) +std::vector Split(std::span sp LIFETIMEBOUND, std::string_view separators, bool include_sep = false) { std::vector ret; auto it = sp.begin(); @@ -145,7 +145,7 @@ std::vector Split(const std::span& sp, std::string_view separator * "foo(bar(1),2),3) on ',' will return {"foo(bar(1)", "2)", "3)"}. */ template > -std::vector Split(const std::span& sp, char sep, bool include_sep = false) +std::vector Split(std::span sp LIFETIMEBOUND, char sep, bool include_sep = false) { return Split(sp, std::string_view{&sep, 1}, include_sep); }