[istringstream.members]

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

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

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

#### 31.8.3.4 Member functions [istringstream.members]

[ð](#lib:rdbuf,basic_istringstream)

`basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
`

[1](#1)

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

*Returns*: const_cast<basic_stringbuf<charT, traits, Allocator>*>(addressof(*sb*))[.](#1.sentence-1)

[ð](#lib:str,basic_istringstream)

`basic_string<charT, traits, Allocator> str() const &;
`

[2](#2)

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

*Effects*: Equivalent to: return rdbuf()->str();

[ð](#lib:str,basic_istringstream_)

`template<class SAlloc>
  basic_string<charT,traits,SAlloc> str(const SAlloc& sa) const;
`

[3](#3)

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

*Effects*: Equivalent to: return rdbuf()->str(sa);

[ð](#lib:str,basic_istringstream__)

`basic_string<charT,traits,Allocator> str() &&;
`

[4](#4)

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

*Effects*: Equivalent to: return std​::​move(*rdbuf()).str();

[ð](#lib:view,basic_istringstream)

`basic_string_view<charT, traits> view() const noexcept;
`

[5](#5)

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

*Effects*: Equivalent to: return rdbuf()->view();

[ð](#lib:str,basic_istringstream___)

`void str(const basic_string<charT, traits, Allocator>& s);
`

[6](#6)

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

*Effects*: Equivalent to: rdbuf()->str(s);

[ð](#lib:str,basic_istringstream____)

`template<class SAlloc>
  void str(const basic_string<charT, traits, SAlloc>& s);
`

[7](#7)

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

*Effects*: Equivalent to: rdbuf()->str(s);

[ð](#lib:str,basic_istringstream_____)

`void str(basic_string<charT, traits, Allocator>&& s);
`

[8](#8)

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

*Effects*: Equivalent to: rdbuf()->str(std​::​move(s));

[ð](#lib:str,basic_istringstream______)

`template<class T>
  void str(const T& t);
`

[9](#9)

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

*Constraints*: is_convertible_v<const T&, basic_string_view<charT, traits>> is true[.](#9.sentence-1)

[10](#10)

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

*Effects*: Equivalent to: rdbuf()->str(t);
