Skip to content

Commit 2a9f778

Browse files
committed
P1148R0 Cleaning up Clause 20
1 parent 12935b8 commit 2a9f778

File tree

2 files changed

+648
-1662
lines changed

2 files changed

+648
-1662
lines changed

source/iostreams.tex

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@
162162
\indexlibrary{\idxcode{wsyncbuf}}%
163163
\indexlibrary{\idxcode{osyncstream}}%
164164
\indexlibrary{\idxcode{wosyncstream}}%
165+
\indexlibrary{\idxcode{fpos}}%
166+
\indexlibrary{\idxcode{streampos}}%
167+
\indexlibrary{\idxcode{wstreampos}}%
168+
\indexlibrary{\idxcode{u16streampos}}%
169+
\indexlibrary{\idxcode{u32streampos}}%
165170
\begin{codeblock}
166171
namespace std {
167172
template<class charT> class char_traits;
@@ -259,6 +264,8 @@
259264
template<class state> class fpos;
260265
using streampos = fpos<char_traits<char>::state_type>;
261266
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>;
262269
}
263270
\end{codeblock}
264271

@@ -301,9 +308,10 @@
301308
class template specialization
302309
\tcode{basic_streambuf<charT, traits>}
303310
serves as a base class for class templates
304-
\tcode{basic_stringbuf}
311+
\tcode{basic_stringbuf},
312+
\tcode{basic_filebuf},
305313
and
306-
\tcode{basic_filebuf}.
314+
\tcode{basic_syncbuf}.
307315

308316
\pnum
309317
The
@@ -319,9 +327,10 @@
319327
class template specialization
320328
\tcode{basic_ostream<charT, traits>}
321329
serves as a base class for class templates
322-
\tcode{basic_ostringstream}
330+
\tcode{basic_ostringstream},
331+
\tcode{basic_ofstream},
323332
and
324-
\tcode{basic_ofstream}.
333+
\tcode{basic_osyncstream}.
325334

326335
\pnum
327336
The
@@ -332,6 +341,15 @@
332341
and
333342
\tcode{basic_fstream}.
334343

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+
335353
\pnum
336354
Other \grammarterm{typedef-name}{s} define instances of
337355
class templates
@@ -366,17 +384,6 @@
366384
\tcode{char_traits<char>}.
367385
An implementation can avoid this circularity by substituting equivalent
368386
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}
380387
\end{note}
381388

382389
\rSec1[iostream.objects]{Standard iostream objects}

0 commit comments

Comments
 (0)