emplace_back {cppcontainers} | R Documentation |
Add an element to the back
Description
Add an element to the back of a container by reference in place.
Usage
emplace_back(x, value)
Arguments
x |
A CppVector, CppDeque, CppList object. |
value |
A value to add to |
Details
The emplace methods only add single elements. Use insert to add multiple elements in one call.
Value
Invisibly returns NULL
.
See Also
emplace, emplace_after, emplace_front, insert, pop_back, push_back.
Examples
v <- cpp_vector(4:6)
v
# 4 5 6
emplace_back(v, 12L)
v
# 4 5 6 12
[Package cppcontainers version 1.0.0 Index]