[istringstream.swap]

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

## 31.8 String-based streams [[string.streams]](string.streams#istringstream.swap)

### 31.8.3 Class template basic_istringstream [[istringstream]](istringstream#swap)

#### 31.8.3.3 Swap [istringstream.swap]

[ð](#lib:swap,basic_istringstream)

`void swap(basic_istringstream& rhs);
`

[1](#1)

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

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

[ð](#lib:swap,basic_istringstream_)

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

[2](#2)

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

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