[ospanstream.members]

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

## 31.9 Span-based streams [[span.streams]](span.streams#ospanstream.members)

### 31.9.5 Class template basic_ospanstream [[ospanstream]](ospanstream#members)

#### 31.9.5.4 Member functions [ospanstream.members]

[ð](#lib:rdbuf,basic_ospanstream)

`basic_spanbuf<charT, traits>* rdbuf() const noexcept;
`

[1](#1)

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

*Effects*: Equivalent to:return const_cast<basic_spanbuf<charT, traits>*>(addressof(*sb*));

[ð](#lib:span,basic_ospanstream)

`std::span<charT> span() const noexcept;
`

[2](#2)

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

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

[ð](#lib:span,basic_ospanstream_)

`void span(std::span<charT> s) noexcept;
`

[3](#3)

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

*Effects*: Equivalent to rdbuf()->span(s)[.](#3.sentence-1)
