3 ms·
Or this: for (std::string_view arg : config.version_script) parse_version_script(std::string(arg));
by malkia 6y ago
Or this:
for (std::string_view arg : config.version_script)
parse_version_script(std::string(arg));
- malkia 6y agoAlthough if somehow nothing gets really freed, and std::string() is kept intact after calling the destructor (e.g. it's data() is still valid) then it'll work :)
- ArchOversight 6y ago`parse_version_script` is defined as taking an `std::string`, std::string() over an `std::string_view` will create a new std::string with a copy of the data from arg.
- deleted 6y ago[deleted]