From Jason Turner

[ios.base.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpbopizujd/{from.md → to.md} +131 -0
tmp/tmpbopizujd/{from.md → to.md} RENAMED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### General <a id="ios.base.general">[[ios.base.general]]</a>
2
+
3
+ ``` cpp
4
+ namespace std {
5
+ class ios_base {
6
+ public:
7
+ class failure; // see below
8
+
9
+ // [ios.fmtflags], fmtflags
10
+ using fmtflags = T1;
11
+ static constexpr fmtflags boolalpha = unspecified;
12
+ static constexpr fmtflags dec = unspecified;
13
+ static constexpr fmtflags fixed = unspecified;
14
+ static constexpr fmtflags hex = unspecified;
15
+ static constexpr fmtflags internal = unspecified;
16
+ static constexpr fmtflags left = unspecified;
17
+ static constexpr fmtflags oct = unspecified;
18
+ static constexpr fmtflags right = unspecified;
19
+ static constexpr fmtflags scientific = unspecified;
20
+ static constexpr fmtflags showbase = unspecified;
21
+ static constexpr fmtflags showpoint = unspecified;
22
+ static constexpr fmtflags showpos = unspecified;
23
+ static constexpr fmtflags skipws = unspecified;
24
+ static constexpr fmtflags unitbuf = unspecified;
25
+ static constexpr fmtflags uppercase = unspecified;
26
+ static constexpr fmtflags adjustfield = see below;
27
+ static constexpr fmtflags basefield = see below;
28
+ static constexpr fmtflags floatfield = see below;
29
+
30
+ // [ios.iostate], iostate
31
+ using iostate = T2;
32
+ static constexpr iostate badbit = unspecified;
33
+ static constexpr iostate eofbit = unspecified;
34
+ static constexpr iostate failbit = unspecified;
35
+ static constexpr iostate goodbit = see below;
36
+
37
+ // [ios.openmode], openmode
38
+ using openmode = T3;
39
+ static constexpr openmode app = unspecified;
40
+ static constexpr openmode ate = unspecified;
41
+ static constexpr openmode binary = unspecified;
42
+ static constexpr openmode in = unspecified;
43
+ static constexpr openmode noreplace = unspecified;
44
+ static constexpr openmode out = unspecified;
45
+ static constexpr openmode trunc = unspecified;
46
+
47
+ // [ios.seekdir], seekdir
48
+ using seekdir = T4;
49
+ static constexpr seekdir beg = unspecified;
50
+ static constexpr seekdir cur = unspecified;
51
+ static constexpr seekdir end = unspecified;
52
+
53
+ class Init;
54
+
55
+ // [fmtflags.state], fmtflags state
56
+ fmtflags flags() const;
57
+ fmtflags flags(fmtflags fmtfl);
58
+ fmtflags setf(fmtflags fmtfl);
59
+ fmtflags setf(fmtflags fmtfl, fmtflags mask);
60
+ void unsetf(fmtflags mask);
61
+
62
+ streamsize precision() const;
63
+ streamsize precision(streamsize prec);
64
+ streamsize width() const;
65
+ streamsize width(streamsize wide);
66
+
67
+ // [ios.base.locales], locales
68
+ locale imbue(const locale& loc);
69
+ locale getloc() const;
70
+
71
+ // [ios.base.storage], storage
72
+ static int xalloc();
73
+ long& iword(int idx);
74
+ void*& pword(int idx);
75
+
76
+ // destructor
77
+ virtual ~ios_base();
78
+
79
+ // [ios.base.callback], callbacks
80
+ enum event { erase_event, imbue_event, copyfmt_event };
81
+ using event_callback = void (*)(event, ios_base&, int idx);
82
+ void register_callback(event_callback fn, int idx);
83
+
84
+ ios_base(const ios_base&) = delete;
85
+ ios_base& operator=(const ios_base&) = delete;
86
+
87
+ static bool sync_with_stdio(bool sync = true);
88
+
89
+ protected:
90
+ ios_base();
91
+
92
+ private:
93
+ static int index; // exposition only
94
+ long* iarray; // exposition only
95
+ void** parray; // exposition only
96
+ };
97
+ }
98
+ ```
99
+
100
+ `ios_base`
101
+
102
+ defines several member types:
103
+
104
+ - a type `failure`, defined as either a class derived from
105
+ `system_error` or a synonym for a class derived from `system_error`;
106
+ - a class `Init`;
107
+ - three bitmask types, `fmtflags`, `iostate`, and `openmode`;
108
+ - an enumerated type, `seekdir`.
109
+
110
+ It maintains several kinds of data:
111
+
112
+ - state information that reflects the integrity of the stream buffer;
113
+ - control information that influences how to interpret (format) input
114
+ sequences and how to generate (format) output sequences;
115
+ - additional information that is stored by the program for its private
116
+ use.
117
+
118
+ [*Note 1*:
119
+
120
+ For the sake of exposition, the maintained data is presented here as:
121
+
122
+ - `static int index`, specifies the next available unique index for the
123
+ integer or pointer arrays maintained for the private use of the
124
+ program, initialized to an unspecified value;
125
+ - `long* iarray`, points to the first element of an arbitrary-length
126
+ `long` array maintained for the private use of the program;
127
+ - `void** parray`, points to the first element of an arbitrary-length
128
+ pointer array maintained for the private use of the program.
129
+
130
+ — *end note*]
131
+