[ostream.cons]

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

## 31.7 Formatting and manipulators [[iostream.format]](iostream.format#ostream.cons)

### 31.7.6 Output streams [[output.streams]](output.streams#ostream.cons)

#### 31.7.6.2 Class template basic_ostream [[ostream]](ostream#cons)

#### 31.7.6.2.2 Constructors [ostream.cons]

[ð](#lib:basic_ostream,constructor)

`explicit basic_ostream(basic_streambuf<charT, traits>* sb);
`

[1](#1)

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

*Effects*: Initializes the base class subobject withbasic_ios<charT, traits>​::​init(sb) ([[basic.ios.cons]](basic.ios.cons "31.5.4.2 Constructors"))[.](#1.sentence-1)

[2](#2)

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

*Postconditions*: rdbuf() == sb[.](#2.sentence-1)

[ð](#lib:basic_ostream,constructor_)

`basic_ostream(basic_ostream&& rhs);
`

[3](#3)

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

*Effects*: Move constructs from the rvalue rhs[.](#3.sentence-1)

This is accomplished by default constructing the base class and callingbasic_ios<charT, traits>​::​move(rhs) to initialize the
base class[.](#3.sentence-2)

[ð](#lib:basic_ostream,destructor)

`virtual ~basic_ostream();
`

[4](#4)

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

*Remarks*: Does not perform any operations onrdbuf()[.](#4.sentence-1)
