[basic.ios.cons] # 31 Input/output library [[input.output]](./#input.output) ## 31.5 Iostreams base classes [[iostreams.base]](iostreams.base#basic.ios.cons) ### 31.5.4 Class template basic_ios [[ios]](ios#basic.ios.cons) #### 31.5.4.2 Constructors [basic.ios.cons] [🔗](#lib:basic_ios,constructor) `explicit basic_ios(basic_streambuf* sb); ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1879) *Effects*: Assigns initial values to its member objects by callinginit(sb)[.](#1.sentence-1) [🔗](#lib:basic_ios,constructor_) `basic_ios(); ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1891) *Effects*: Leaves its member objects uninitialized[.](#2.sentence-1) The object shall be initialized by callingbasic_ios​::​init before its first use or before it is destroyed, whichever comes first; otherwise the behavior is undefined[.](#2.sentence-2) [🔗](#lib:basic_ios,destructor) `~basic_ios(); ` [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1906) *Remarks*: The destructor does not destroyrdbuf()[.](#3.sentence-1) [🔗](#lib:init,basic_ios) `void init(basic_streambuf* sb); ` [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1918) *Postconditions*: The postconditions of this function are indicated in Table [142](#tab:basic.ios.cons "Table 142: basic_­ios​::​init() effects")[.](#4.sentence-1) Table [142](#tab:basic.ios.cons) — basic_ios​::​init() effects [[tab:basic.ios.cons]](./tab:basic.ios.cons) | [🔗](#tab:basic.ios.cons-row-1)
**Element** | **Value** | | --- | --- | | [🔗](#tab:basic.ios.cons-row-2)
rdbuf() | sb | | [🔗](#tab:basic.ios.cons-row-3)
tie() | 0 | | [🔗](#tab:basic.ios.cons-row-4)
rdstate() | goodbit if sb is not a null pointer, otherwise badbit[.](#tab:basic.ios.cons-row-4-column-2-sentence-1) | | [🔗](#tab:basic.ios.cons-row-5)
exceptions() | goodbit | | [🔗](#tab:basic.ios.cons-row-6)
flags() | skipws | dec | | [🔗](#tab:basic.ios.cons-row-7)
width() | 0 | | [🔗](#tab:basic.ios.cons-row-8)
precision() | 6 | | [🔗](#tab:basic.ios.cons-row-9)
fill() | widen(' ') | | [🔗](#tab:basic.ios.cons-row-10)
getloc() | a copy of the value returned by locale() | | [🔗](#tab:basic.ios.cons-row-11)
*iarray* | a null pointer | | [🔗](#tab:basic.ios.cons-row-12)
*parray* | a null pointer |