Files
2025-10-25 03:02:53 +03:00

51 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[ios.init]
# 31 Input/output library [[input.output]](./#input.output)
## 31.5 Iostreams base classes [[iostreams.base]](iostreams.base#ios.init)
### 31.5.2 Class ios_base [[ios.base]](ios.base#ios.init)
#### 31.5.2.2 Types [[ios.types]](ios.types#ios.init)
#### 31.5.2.2.6 Class ios_base::Init [ios.init]
[🔗](#lib:ios_base::Init)
namespace std {class ios_base::Init {public: Init();
Init(const Init&) = default; ~Init();
Init& operator=(const Init&) = default; };}
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1139)
The class Init describes an object whose construction
ensures the construction of the eight objects declared in[<iostream>](iostream.syn#header:%3ciostream%3e "31.4.1Header <iostream> synopsis[iostream.syn]") ([[iostream.objects]](iostream.objects "31.4Standard iostream objects")) that associate file
stream buffers with the standard C streams
provided for by the functions declared in[<cstdio>](cstdio.syn#header:%3ccstdio%3e "31.13.1Header <cstdio> synopsis[cstdio.syn]")[.](#1.sentence-1)
[🔗](#lib:ios_base::Init,constructor)
`Init();
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1154)
*Effects*: Constructs and initializes the objects cin, cout, cerr,clog, wcin, wcout, wcerr, and wclog if
they have not already been constructed and initialized[.](#2.sentence-1)
[🔗](#lib:ios_base::Init,destructor)
`~Init();
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1167)
*Effects*: If there are no other instances of the class still in existence,
callscout.flush(),cerr.flush(),clog.flush(),wcout.flush(),wcerr.flush(),wclog.flush()[.](#3.sentence-1)