[ostreambuf.iter.cons]

# 24 Iterators library [[iterators]](./#iterators)

## 24.6 Stream iterators [[stream.iterators]](stream.iterators#ostreambuf.iter.cons)

### 24.6.5 Class template ostreambuf_iterator [[ostreambuf.iterator]](ostreambuf.iterator#ostreambuf.iter.cons)

#### 24.6.5.2 Constructors [ostreambuf.iter.cons]

[ð](#lib:ostreambuf_iterator,constructor)

`ostreambuf_iterator(ostream_type& s) noexcept;
`

[1](#1)

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

*Preconditions*: s.rdbuf() is not a null pointer[.](#1.sentence-1)

[2](#2)

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

*Effects*: Initializes sbuf_ with s.rdbuf()[.](#2.sentence-1)

[ð](#lib:ostreambuf_iterator,constructor_)

`ostreambuf_iterator(streambuf_type* s) noexcept;
`

[3](#3)

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

*Preconditions*: s is not a null pointer[.](#3.sentence-1)

[4](#4)

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

*Effects*: Initializes sbuf_ with s[.](#4.sentence-1)
