News for hackers. Stuff that matters.
Re:Performance Improvement with the StringBuilder for C++ by Someone on Friday September 06, 2013 @12:35PM (#6341278)

    string s = accumulate(vec.begin(), vec.end(), s);
Is that legal C++? I would think that passes s to 'accumulate' before constructing it (http://www.gotw.ca/gotw/001.htm). IMO, a correct way to do this would be:

    string s; // calls string::string()
    s = accumulate(vec.begin(), vec.end(), s);
or string s = accumulate(vec.begin(), vec.end(), "");

There are no comments on this comment yet.