[spanstream.swap]

# 31 Input/output library [[input.output]](./#input.output)

## 31.9 Span-based streams [[span.streams]](span.streams#spanstream.swap)

### 31.9.6 Class template basic_spanstream [[spanstream]](spanstream#swap)

#### 31.9.6.3 Swap [spanstream.swap]

[ð](#lib:swap,basic_spanstream)

`void swap(basic_spanstream& rhs);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10804)

*Effects*: Equivalent to:basic_iostream<charT, traits>::swap(rhs);*sb*.swap(rhs.*sb*);

[ð](#lib:swap,basic_spanstream_)

`template<class charT, class traits>
  void swap(basic_spanstream<charT, traits>& x, basic_spanstream<charT, traits>& y);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L10820)

*Effects*: Equivalent to x.swap(y)[.](#2.sentence-1)
