...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Front Page / Algorithms / Inserters / back_inserter |
template< typename Seq > struct back_inserter { // unspecified // ... };
Inserts elements at the end of the sequence.
#include <boost/mpl/back_inserter.hpp>
Parameter | Requirement | Description |
---|---|---|
Seq | Back Extensible Sequence | A sequence to bind the inserter to. |
The semantics of an expression are defined only where they differ from, or are not defined in Inserter.
For any Back Extensible Sequence s:
Expression | Semantics |
---|---|
back_inserter<s> | An Inserter in, equivalent to struct in : inserter<s,push_back<_1,_2> > {}; |
Amortized constant time.
typedef copy< range_c<int,5,10> , back_inserter< vector_c<int,0,1,2,3,4> > >::type range; BOOST_MPL_ASSERT(( equal< range, range_c<int,0,10> > ));