Efficiently exchange the values of the specified a and b objects.
Declared in <bslstl_stringbuf.h>
template<
class CHAR_TYPE,
class CHAR_TRAITS,
class ALLOCATOR>
void
swap(
basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>& a,
basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>& b);
This method provides the no-throw exception-safety guarantee if a and b allocators compare equal. Note that this function is only available for C++11 (and later) language standards.
| Name | Description |
|---|---|
| a | first buffer to exchange |
| b | second buffer to exchange |