3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/push-back.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Sequences / Intrinsic Metafunctions / push_back |
template<
typename Sequence
, typename T
>
struct[push\_back](./push-back.html){
typedef_unspecified_type;
};
push_back performs an insertion at the end of the sequence with guaranteed O(1) complexity.
#include <[boost/mpl/push\_back.hpp](../../../../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](./push-back.html)<s,x>::type r;
| Return type: |
| | Semantics: |
Equivalent to
typedef[insert](./insert.html)< s,[end](./end.html)<s>::type,x >::type r;
| | Postcondition: |
back<r>::type is identical to x;
[size](./size.html)<r>::value ==[size](./size.html)<s>::value + 1
|
Amortized constant time.
typedef[vector\_c](./vector-c.html)<bool,false,false,false,
true,true,true,false,false> bools;
typedef[push\_back](./push-back.html)<bools,[false\_](./bool.html)>::type message;[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)([back](./back.html)<message>::type::value, ==, false );[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)(
([count\_if](./count-if.html)<message,[equal\_to](./equal-to.html)<[\_1](./placeholders.html),[false\_](./bool.html)> >::value ), ==, 6
);
Back Extensible Sequence, insert, pop_back, back, push_front
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |