Skip to content

Commit 4480f56

Browse files
committed
Merge 2018-03 LWG Motion 14
2 parents a21841f + 88d223c commit 4480f56

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

source/iostreams.tex

+75
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
}
@@ -6677,6 +6684,72 @@
66776684
\tcode{os}.
66786685
\end{itemdescr}
66796686

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

66826755
\indexlibrarymember{operator<<}{basic_ostream}%
@@ -9967,6 +10040,8 @@
996710040
\indexlibrary{\idxcode{osyncstream}}%
996810041
\indexlibrary{\idxcode{wosyncstream}}%
996910042
\begin{codeblock}
10043+
#include <ostream> // see \ref{ostream.syn}
10044+
997010045
namespace std {
997110046
template<class charT, class traits, class Allocator>
997210047
class basic_syncbuf;

0 commit comments

Comments
 (0)