Yucky code dump
Jump to navigation
Jump to search
Mildly yucky
Unnecessary str::string
instantiations
Getting substrings
Don't do this: https://stackoverflow.com/a/55210196 (applies to the last revision from 2019)
auto str = std::string(input.begin() + input.find(' '), input.end());
Do this:
auto str = std::string_view(input.begin() + input.find(' '), input.end());
That neatly avoids allocating space for the substring and then copying the substring there.