...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 / Sequences / Intrinsic Metafunctions / push_back |
push_back performs an insertion at the end of the sequence with guaranteed O(1) complexity.
#include <boost/mpl/push_back.hpp>
Parameter | Requirement | Description |
---|---|---|
Sequence | Back Extensible Sequence | A sequence to insert into. |
T | Any type | The element to be inserted. |
For any Back Extensible Sequence s and arbitrary type x:
typedef push_back<s,x>::type r;
Return type: | |
---|---|
Semantics: | Equivalent to typedef insert< s,end<s>::type,x >::type r; |
Postcondition: | back<r>::type is identical to x; size<r>::value == size<s>::value + 1 |
Amortized constant time.