...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::swap — Swap the contents of two circular_buffer
s.
// In header: <boost/circular_buffer/base.hpp> template<typename T, typename Alloc> void swap(circular_buffer< T, Alloc > & lhs, circular_buffer< T, Alloc > & rhs);
Complexity. Constant (in the size of the circular_buffer
s).
Iterator Invalidation. Invalidates all iterators of both circular_buffer
s. (On the other hand the iterators still point to the same elements but within another container. If you want to rely on this feature you have to turn the Debug Support off otherwise an assertion will report an error if such invalidated iterator is used.)
See Also: swap(circular_buffer<T, Alloc>&)
Parameters: |
|
||||
Postconditions: |
|
||||
Throws: |
Nothing. |