Use std::back_inserter

This commit is contained in:
Dennis Luxen 2022-11-06 12:19:32 +01:00
parent cb515ba42f
commit b13820f520

View File

@ -73,7 +73,7 @@ template <typename StringView> inline auto decompose(const StringView &lhs, cons
std::string str;
str.reserve(view.size());
std::transform(
str.begin(), str.end(), str.begin(), [](unsigned char c) { return std::tolower(c); });
view.begin(), view.end(), std::back_inserter(str), [](unsigned char c) { return std::tolower(c); });
auto front = str.find_first_not_of(' ');
if (front == std::string::npos)