|
162 | 162 | \indexlibrary{\idxcode{wsyncbuf}}%
|
163 | 163 | \indexlibrary{\idxcode{osyncstream}}%
|
164 | 164 | \indexlibrary{\idxcode{wosyncstream}}%
|
| 165 | +\indexlibrary{\idxcode{fpos}}% |
| 166 | +\indexlibrary{\idxcode{streampos}}% |
| 167 | +\indexlibrary{\idxcode{wstreampos}}% |
| 168 | +\indexlibrary{\idxcode{u16streampos}}% |
| 169 | +\indexlibrary{\idxcode{u32streampos}}% |
165 | 170 | \begin{codeblock}
|
166 | 171 | namespace std {
|
167 | 172 | template<class charT> class char_traits;
|
|
259 | 264 | template<class state> class fpos;
|
260 | 265 | using streampos = fpos<char_traits<char>::state_type>;
|
261 | 266 | using wstreampos = fpos<char_traits<wchar_t>::state_type>;
|
| 267 | + using u16streampos = fpos<char_traits<char16_t>::state_type>; |
| 268 | + using u32streampos = fpos<char_traits<char32_t>::state_type>; |
262 | 269 | }
|
263 | 270 | \end{codeblock}
|
264 | 271 |
|
|
301 | 308 | class template specialization
|
302 | 309 | \tcode{basic_streambuf<charT, traits>}
|
303 | 310 | serves as a base class for class templates
|
304 |
| -\tcode{basic_stringbuf} |
| 311 | +\tcode{basic_stringbuf}, |
| 312 | +\tcode{basic_filebuf}, |
305 | 313 | and
|
306 |
| -\tcode{basic_filebuf}. |
| 314 | +\tcode{basic_syncbuf}. |
307 | 315 |
|
308 | 316 | \pnum
|
309 | 317 | The
|
|
319 | 327 | class template specialization
|
320 | 328 | \tcode{basic_ostream<charT, traits>}
|
321 | 329 | serves as a base class for class templates
|
322 |
| -\tcode{basic_ostringstream} |
| 330 | +\tcode{basic_ostringstream}, |
| 331 | +\tcode{basic_ofstream}, |
323 | 332 | and
|
324 |
| -\tcode{basic_ofstream}. |
| 333 | +\tcode{basic_osyncstream}. |
325 | 334 |
|
326 | 335 | \pnum
|
327 | 336 | The
|
|
332 | 341 | and
|
333 | 342 | \tcode{basic_fstream}.
|
334 | 343 |
|
| 344 | +\pnum |
| 345 | +\begin{note} |
| 346 | +For each of the class templates above, |
| 347 | +the program is ill-formed if |
| 348 | +\tcode{traits::char_type} |
| 349 | +is not the same type as |
| 350 | +\tcode{charT}\iref{char.traits}. |
| 351 | +\end{note} |
| 352 | + |
335 | 353 | \pnum
|
336 | 354 | Other \grammarterm{typedef-name}{s} define instances of
|
337 | 355 | class templates
|
|
366 | 384 | \tcode{char_traits<char>}.
|
367 | 385 | An implementation can avoid this circularity by substituting equivalent
|
368 | 386 | types.
|
369 |
| -One way to do this might be |
370 |
| -\begin{codeblock} |
371 |
| -template<class stateT> class fpos { @\commentellip@ }; // depends on nothing |
372 |
| -using _STATE = @\commentellip@ ; // implementation private declaration of \tcode{stateT} |
373 |
| - |
374 |
| -using streampos = fpos<_STATE>; |
375 |
| - |
376 |
| -template<> struct char_traits<char> { |
377 |
| - using pos_type = streampos; |
378 |
| -} |
379 |
| -\end{codeblock} |
380 | 387 | \end{note}
|
381 | 388 |
|
382 | 389 | \rSec1[iostream.objects]{Standard iostream objects}
|
|
0 commit comments