Skip to content

Comment on Why should I have written ZeroMQ in C, not C++ (part II)parent

Comments

std::list<T>::splice() lets you move elements between lists without copies or allocations.

Before C++11, it was a problem that inserting an element into a std::list required a copy (that's the only place though - once in the list there are no more copies). C++11 adds move semantics and also std::list<T>::emplace(), which eliminate the need to copy.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.