listsstacksand queues template void printconst container costream out cout ifc emptyout <"(empty)"else auto itr beginc )/itr is container::const_iterator out <"<*itr++/print first item whileitr !endc out <"<*itr++out <]<endlfigure printing any container non-member functions the addition of begin and end as free functions in ++ is made possible by the addition of language features auto and decltypeas shown in the code below template auto begincontainer -decltypec beginreturn begin)template auto beginconst container -decltypec beginreturn begin)in this codethe return type of begin is deduced to be the type of begin(the code in figure makes use of auto to declare the iterator (as in fig and uses non-member functions begin and end implementation of vector in this sectionwe provide the implementation of usable vector class template the vector will be first-class typemeaning that unlike the primitive array in ++the vector can be copiedand the memory it uses can be automatically reclaimed (via its destructorin section we described some important features of +primitive arrays