Skip to content

Commit 239dee9

Browse files
committed
Merge 2018-03 LWG Motion 14
2 parents 16cfab2 + 8b05148 commit 239dee9

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

source/iostreams.tex

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4105,6 +4105,13 @@
41054105
template<class charT, class traits>
41064106
basic_ostream<charT, traits>& flush(basic_ostream<charT, traits>& os);
41074107

4108+
template<class charT, class traits>
4109+
basic_ostream<charT, traits>& emit_on_flush(basic_ostream<charT, traits>& os);
4110+
template<class charT, class traits>
4111+
basic_ostream<charT, traits>& noemit_on_flush(basic_ostream<charT, traits>& os);
4112+
template<class charT, class traits>
4113+
basic_ostream<charT, traits>& flush_emit(basic_ostream<charT, traits>& os);
4114+
41084115
template<class charT, class traits, class T>
41094116
basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&& os, const T& x);
41104117
}
@@ -6676,6 +6683,69 @@
66766683
\tcode{os}.
66776684
\end{itemdescr}
66786685

6686+
\indexlibrary{\idxcode{emit_on_flush}}%
6687+
\begin{itemdecl}
6688+
template<class charT, class traits>
6689+
basic_ostream<charT, traits>& emit_on_flush(basic_ostream<charT, traits>& os);
6690+
\end{itemdecl}
6691+
6692+
\begin{itemdescr}
6693+
\pnum
6694+
\effects
6695+
If \tcode{os.rdbuf()} is a
6696+
\tcode{basic_osyncbuf<charT, traits, Allocator>*} \tcode{buf},
6697+
calls \tcode{buf->set_emit_on_sync(true)}.
6698+
Otherwise this manipulator has no effect.
6699+
\begin{note}
6700+
To work around the issue that the
6701+
\tcode{Allocator} template argument can not be deduced,
6702+
implementations can introduce an intermediate base class
6703+
to \tcode{basic_osyncbuf} that manages its \tcode{emit_on_sync} flag.
6704+
\end{note}
6705+
6706+
\pnum
6707+
\returns
6708+
\tcode{os}.
6709+
\end{itemdescr}
6710+
6711+
\indexlibrary{\idxcode{noemit_on_flush}}%
6712+
\begin{itemdecl}
6713+
template<class charT, class traits>
6714+
basic_ostream<charT, traits>& noemit_on_flush(basic_ostream<charT, traits>& os);
6715+
\end{itemdecl}
6716+
6717+
\begin{itemdescr}
6718+
\pnum
6719+
\effects
6720+
If \tcode{os.rdbuf()} is a
6721+
\tcode{basic_osyncbuf<charT, traits, Allocator>*} \tcode{buf},
6722+
calls \tcode{buf->set_emit_on_sync(false)}.
6723+
Otherwise this manipulator has no effect.
6724+
6725+
\pnum
6726+
\returns
6727+
\tcode{os}.
6728+
\end{itemdescr}
6729+
6730+
\indexlibrary{\idxcode{flush_emit}}%
6731+
\begin{itemdecl}
6732+
template<class charT, class traits>
6733+
basic_ostream<charT, traits>& flush_emit(basic_ostream<charT, traits>& os);
6734+
\end{itemdecl}
6735+
6736+
\begin{itemdescr}
6737+
\pnum
6738+
\effects
6739+
\tcode{os.flush()}.
6740+
Then, if \tcode{os.rdbuf()} is a
6741+
\tcode{basic_osyncbuf<charT, traits, Allocator>*} \tcode{buf},
6742+
calls \tcode{buf->emit()}.
6743+
6744+
\pnum
6745+
\returns
6746+
\tcode{os}.
6747+
\end{itemdescr}
6748+
66796749
\rSec3[ostream.rvalue]{Rvalue stream insertion}
66806750

66816751
\indexlibrarymember{operator<<}{basic_ostream}%
@@ -9966,6 +10036,8 @@
996610036
\indexlibrary{\idxcode{osyncstream}}%
996710037
\indexlibrary{\idxcode{wosyncstream}}%
996810038
\begin{codeblock}
10039+
#include <ostream> // see \ref{ostream.syn}
10040+
996910041
namespace std {
997010042
template<class charT, class traits, class Allocator>
997110043
class basic_syncbuf;

0 commit comments

Comments
 (0)