Skip to content

Commit 1541a91

Browse files
authored
Merge 2018-11 LWG Motion 12
P1148R0 Cleaning up Clause 20 Fixes #2418
2 parents e36cd33 + d9521a9 commit 1541a91

File tree

3 files changed

+663
-1665
lines changed

3 files changed

+663
-1665
lines changed

source/iostreams.tex

Lines changed: 24 additions & 17 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;
@@ -261,6 +266,8 @@
261266
using streampos = fpos<char_traits<char>::state_type>;
262267
using wstreampos = fpos<char_traits<wchar_t>::state_type>;
263268
using u8streampos = fpos<char_traits<char8_t>::state_type>;
269+
using u16streampos = fpos<char_traits<char16_t>::state_type>;
270+
using u32streampos = fpos<char_traits<char32_t>::state_type>;
264271
}
265272
\end{codeblock}
266273

@@ -303,9 +310,10 @@
303310
class template specialization
304311
\tcode{basic_streambuf<charT, traits>}
305312
serves as a base class for class templates
306-
\tcode{basic_stringbuf}
313+
\tcode{basic_stringbuf},
314+
\tcode{basic_filebuf},
307315
and
308-
\tcode{basic_filebuf}.
316+
\tcode{basic_syncbuf}.
309317

310318
\pnum
311319
The
@@ -321,9 +329,10 @@
321329
class template specialization
322330
\tcode{basic_ostream<charT, traits>}
323331
serves as a base class for class templates
324-
\tcode{basic_ostringstream}
332+
\tcode{basic_ostringstream},
333+
\tcode{basic_ofstream},
325334
and
326-
\tcode{basic_ofstream}.
335+
\tcode{basic_osyncstream}.
327336

328337
\pnum
329338
The
@@ -334,6 +343,15 @@
334343
and
335344
\tcode{basic_fstream}.
336345

346+
\pnum
347+
\begin{note}
348+
For each of the class templates above,
349+
the program is ill-formed if
350+
\tcode{traits::char_type}
351+
is not the same type as
352+
\tcode{charT}\iref{char.traits}.
353+
\end{note}
354+
337355
\pnum
338356
Other \grammarterm{typedef-name}{s} define instances of
339357
class templates
@@ -348,8 +366,7 @@
348366
\tcode{fpos}
349367
are
350368
used for specifying file position information.
351-
352-
\pnum
369+
\begin{example}
353370
The types
354371
\tcode{streampos}
355372
and
@@ -359,6 +376,7 @@
359376
and
360377
\tcode{wchar_t}
361378
respectively.
379+
\end{example}
362380

363381
\pnum
364382
\begin{note}
@@ -368,17 +386,6 @@
368386
\tcode{char_traits<char>}.
369387
An implementation can avoid this circularity by substituting equivalent
370388
types.
371-
One way to do this might be
372-
\begin{codeblock}
373-
template<class stateT> class fpos { @\commentellip@ }; // depends on nothing
374-
using _STATE = @\commentellip@ ; // implementation private declaration of \tcode{stateT}
375-
376-
using streampos = fpos<_STATE>;
377-
378-
template<> struct char_traits<char> {
379-
using pos_type = streampos;
380-
}
381-
\end{codeblock}
382389
\end{note}
383390

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

0 commit comments

Comments
 (0)