Compiled in 2008, gives error C2275, illegal use of this type as an expression in 2012
Never mind. Apparently you need to #include <iterator> now.Code:template < class tSTLContainer // The type of STL container to copy. > void STLCopy (tSTLContainer& outDest, const tSTLContainer& inSource) { copy(inSource.begin(), inSource.end(), insert_iterator<tSTLContainer>(outDest, outDest.begin())); }