(C++) std::back\_inserter
January 11, 2018 · View on GitHub
(C++) std::back_inserter
std::back_inserter is a type of inserter.
A good use of std::back_inserter is when you std::copy to a container class.
Example: Append
#include <algorithm //From http://www.richelbilderbeek.nl template <class Container> void Append(Container& toWhat, const Container& whatToAppend) { std::copy(whatToAppend.begin(),whatToAppend.end(),std::back_inserter (toWhat)); }
External links