From Jason Turner

[iostream.forward]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpfjfsinr8/{from.md → to.md} +35 -28
tmp/tmpfjfsinr8/{from.md → to.md} RENAMED
@@ -2,15 +2,16 @@
2
 
3
  ### Header `<iosfwd>` synopsis <a id="iosfwd.syn">[[iosfwd.syn]]</a>
4
 
5
  ``` cpp
6
  namespace std {
7
- template<class charT> class char_traits;
8
- template<> class char_traits<char>;
9
- template<> class char_traits<char16_t>;
10
- template<> class char_traits<char32_t>;
11
- template<> class char_traits<wchar_t>;
 
12
 
13
  template<class T> class allocator;
14
 
15
  template<class charT, class traits = char_traits<charT>>
16
  class basic_ios;
@@ -43,10 +44,17 @@ namespace std {
43
  template<class charT, class traits = char_traits<charT>>
44
  class basic_ofstream;
45
  template<class charT, class traits = char_traits<charT>>
46
  class basic_fstream;
47
 
 
 
 
 
 
 
 
48
  template<class charT, class traits = char_traits<charT>>
49
  class istreambuf_iterator;
50
  template<class charT, class traits = char_traits<charT>>
51
  class ostreambuf_iterator;
52
 
@@ -66,10 +74,13 @@ namespace std {
66
  using filebuf = basic_filebuf<char>;
67
  using ifstream = basic_ifstream<char>;
68
  using ofstream = basic_ofstream<char>;
69
  using fstream = basic_fstream<char>;
70
 
 
 
 
71
  using wstreambuf = basic_streambuf<wchar_t>;
72
  using wistream = basic_istream<wchar_t>;
73
  using wostream = basic_ostream<wchar_t>;
74
  using wiostream = basic_iostream<wchar_t>;
75
 
@@ -81,13 +92,19 @@ namespace std {
81
  using wfilebuf = basic_filebuf<wchar_t>;
82
  using wifstream = basic_ifstream<wchar_t>;
83
  using wofstream = basic_ofstream<wchar_t>;
84
  using wfstream = basic_fstream<wchar_t>;
85
 
 
 
 
86
  template<class state> class fpos;
87
  using streampos = fpos<char_traits<char>::state_type>;
88
  using wstreampos = fpos<char_traits<wchar_t>::state_type>;
 
 
 
89
  }
90
  ```
91
 
92
  Default template arguments are described as appearing both in `<iosfwd>`
93
  and in the synopsis of other headers but it is well-formed to include
@@ -100,48 +117,38 @@ virtual base class for the class templates `basic_istream`,
100
  `basic_ostream`, and class templates derived from them. `basic_iostream`
101
  is a class template derived from both `basic_istream<charT, traits>` and
102
  `basic_ostream<charT, traits>`.
103
 
104
  The class template specialization `basic_streambuf<charT, traits>`
105
- serves as a base class for class templates `basic_stringbuf` and
106
- `basic_filebuf`.
107
 
108
  The class template specialization `basic_istream<charT, traits>` serves
109
  as a base class for class templates `basic_istringstream` and
110
  `basic_ifstream`.
111
 
112
  The class template specialization `basic_ostream<charT, traits>` serves
113
- as a base class for class templates `basic_ostringstream` and
114
- `basic_ofstream`.
115
 
116
  The class template specialization `basic_iostream<charT, traits>` serves
117
  as a base class for class templates `basic_stringstream` and
118
  `basic_fstream`.
119
 
 
 
 
 
120
  Other *typedef-name*s define instances of class templates specialized
121
  for `char` or `wchar_t` types.
122
 
123
  Specializations of the class template `fpos` are used for specifying
124
  file position information.
125
 
126
- The types `streampos` and `wstreampos` are used for positioning streams
127
- specialized on `char` and `wchar_t` respectively.
 
128
 
129
- [*Note 1*:
130
-
131
- This synopsis suggests a circularity between `streampos` and
132
  `char_traits<char>`. An implementation can avoid this circularity by
133
- substituting equivalent types. One way to do this might be
134
-
135
- ``` cpp
136
- template<class stateT> class fpos { ... }; // depends on nothing
137
- using _STATE = ... ; // implementation private declaration of stateT
138
-
139
- using streampos = fpos<_STATE>;
140
-
141
- template<> struct char_traits<char> {
142
- using pos_type = streampos;
143
- }
144
- ```
145
-
146
- — *end note*]
147
 
 
2
 
3
  ### Header `<iosfwd>` synopsis <a id="iosfwd.syn">[[iosfwd.syn]]</a>
4
 
5
  ``` cpp
6
  namespace std {
7
+ template<class charT> struct char_traits;
8
+ template<> struct char_traits<char>;
9
+ template<> struct char_traits<char8_t>;
10
+ template<> struct char_traits<char16_t>;
11
+ template<> struct char_traits<char32_t>;
12
+ template<> struct char_traits<wchar_t>;
13
 
14
  template<class T> class allocator;
15
 
16
  template<class charT, class traits = char_traits<charT>>
17
  class basic_ios;
 
44
  template<class charT, class traits = char_traits<charT>>
45
  class basic_ofstream;
46
  template<class charT, class traits = char_traits<charT>>
47
  class basic_fstream;
48
 
49
+ template<class charT, class traits = char_traits<charT>,
50
+ class Allocator = allocator<charT>>
51
+ class basic_syncbuf;
52
+ template<class charT, class traits = char_traits<charT>,
53
+ class Allocator = allocator<charT>>
54
+ class basic_osyncstream;
55
+
56
  template<class charT, class traits = char_traits<charT>>
57
  class istreambuf_iterator;
58
  template<class charT, class traits = char_traits<charT>>
59
  class ostreambuf_iterator;
60
 
 
74
  using filebuf = basic_filebuf<char>;
75
  using ifstream = basic_ifstream<char>;
76
  using ofstream = basic_ofstream<char>;
77
  using fstream = basic_fstream<char>;
78
 
79
+ using syncbuf = basic_syncbuf<char>;
80
+ using osyncstream = basic_osyncstream<char>;
81
+
82
  using wstreambuf = basic_streambuf<wchar_t>;
83
  using wistream = basic_istream<wchar_t>;
84
  using wostream = basic_ostream<wchar_t>;
85
  using wiostream = basic_iostream<wchar_t>;
86
 
 
92
  using wfilebuf = basic_filebuf<wchar_t>;
93
  using wifstream = basic_ifstream<wchar_t>;
94
  using wofstream = basic_ofstream<wchar_t>;
95
  using wfstream = basic_fstream<wchar_t>;
96
 
97
+ using wsyncbuf = basic_syncbuf<wchar_t>;
98
+ using wosyncstream = basic_osyncstream<wchar_t>;
99
+
100
  template<class state> class fpos;
101
  using streampos = fpos<char_traits<char>::state_type>;
102
  using wstreampos = fpos<char_traits<wchar_t>::state_type>;
103
+ using u8streampos = fpos<char_traits<char8_t>::state_type>;
104
+ using u16streampos = fpos<char_traits<char16_t>::state_type>;
105
+ using u32streampos = fpos<char_traits<char32_t>::state_type>;
106
  }
107
  ```
108
 
109
  Default template arguments are described as appearing both in `<iosfwd>`
110
  and in the synopsis of other headers but it is well-formed to include
 
117
  `basic_ostream`, and class templates derived from them. `basic_iostream`
118
  is a class template derived from both `basic_istream<charT, traits>` and
119
  `basic_ostream<charT, traits>`.
120
 
121
  The class template specialization `basic_streambuf<charT, traits>`
122
+ serves as a base class for class templates `basic_stringbuf`,
123
+ `basic_filebuf`, and `basic_syncbuf`.
124
 
125
  The class template specialization `basic_istream<charT, traits>` serves
126
  as a base class for class templates `basic_istringstream` and
127
  `basic_ifstream`.
128
 
129
  The class template specialization `basic_ostream<charT, traits>` serves
130
+ as a base class for class templates `basic_ostringstream`,
131
+ `basic_ofstream`, and `basic_osyncstream`.
132
 
133
  The class template specialization `basic_iostream<charT, traits>` serves
134
  as a base class for class templates `basic_stringstream` and
135
  `basic_fstream`.
136
 
137
+ [*Note 1*: For each of the class templates above, the program is
138
+ ill-formed if `traits::char_type` is not the same type as `charT`
139
+ [[char.traits]]. — *end note*]
140
+
141
  Other *typedef-name*s define instances of class templates specialized
142
  for `char` or `wchar_t` types.
143
 
144
  Specializations of the class template `fpos` are used for specifying
145
  file position information.
146
 
147
+ [*Example 1*: The types `streampos` and `wstreampos` are used for
148
+ positioning streams specialized on `char` and `wchar_t`
149
+ respectively. — *end example*]
150
 
151
+ [*Note 2*: This synopsis suggests a circularity between `streampos` and
 
 
152
  `char_traits<char>`. An implementation can avoid this circularity by
153
+ substituting equivalent types. *end note*]
 
 
 
 
 
 
 
 
 
 
 
 
 
154