chsvlib
chsv helper source code

◆ swap()

void Chusov::Memory::swap ( sbo_vector< ElementType, sbo_threshold, Allocator > &  left,
sbo_vector< ElementType, sbo_threshold, Allocator > &  right 
)

Swaps contents of two SBO vectors.

Parameters
leftThe first vector to swap the contents with right.
rightThe other vector to swap the contents with left.
Remarks
Invalidates iterators associated with both vectors.
The procedure may involve move-construction and destruction of elements.
Swaps allocators, if std::allocator_traits<allocator_type>::propagate_on_container_swap::value is false.