Does the boost split function require copying the source string before split?
For example-
const char *c = "S1 S2 S3";
std::vector<std::string> v;
boost:开发者_运维技巧:split(v, c, boost::is_any_of(" "));
It works exactly like your code. No need to copy.
You do not have to copy, according to this it will make copies for you (you could also store references). There is no problems with const
inputs thus.
精彩评论