chsvlib
chsv helper source code

◆ sbo_vector() [4/10]

sbo_vector ( sbo_vector< ElementType, sbo_threshold, Allocator > &&  right,
const Allocator &  allocator 
)
noexcept

Creates a vector moving in another vector of the same type but with a specified allocator instead of one used by the original vector.

Parameters
rightA vector contents of which are moved into the created vector. If it is possible, i.e. the allocator created from the argument allocator equals to the allocator in right, the contents of right are actually moved into the new state. Otherwise, if the allocators do not compare equal, the contents are copied into the state of the created vector leaving right unchanged.
allocatorAn instance of an allocator copied into a state of the created vector to use when heap allocations happen.