May 2017
Intermediate to advanced
590 pages
17h 18m
English
std::back_inserter(), std::front_inserter(), and std::inserter() are all helper functions that create iterator adapters of types, std::back_insert_iterator, std::front_insert_iterator, and std::insert_iterator. These are all output iterators that append, prepend, or insert into the container for which they were constructed. Incrementing and dereferencing these iterators does not do anything. However, upon assignment, these iterators call the following methods from the container:
The following is the over-simplified implementation of std::back_inserter_iterator:
template<class C> class back_insert_iterator ...Read now
Unlock full access