Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 30 additions & 18 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6771,6 +6771,24 @@
specified in this subclause
is a designated addressable function\iref{namespace.std}.

\pnum
In this subclause,
\exposid{SYNCBUF}\tcode{(p)} for a pointer \tcode{p} of type \tcode{B*}
is determined as follows.
If \tcode{*p} is a base class subobject of an object of type \tcode{S},
where \tcode{S} is a specialization generated from
the \tcode{basic_syncbuf} primary template,
and \tcode{is_convertible_v<S*, B*>} is \tcode{true},
then \exposid{SYNCBUF}\tcode{(p)} is \tcode{dynamic_cast<S*>(p)}.
Otherwise, \exposid{SYNCBUF}\tcode{(p)} is \tcode{static_cast<void*>(nullptr)}.

\begin{note}
To work around the issue that the
\tcode{Allocator} template argument of \tcode{S} cannot be deduced,
implementations can introduce an intermediate base class
to \tcode{basic_syncbuf} that manages its \tcode{emit_on_sync} flag.
\end{note}

\indexlibraryglobal{endl}%
\begin{itemdecl}
template<class charT, class traits>
Expand Down Expand Up @@ -6832,19 +6850,13 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
Let \tcode{p} be \exposid{SYNCBUF}\tcode{(os.rdbuf())}.

\pnum
\effects
If \tcode{os.rdbuf()} is a
\tcode{basic_syncbuf<charT, traits, Allocator>*},
called \tcode{buf} for the purpose of exposition,
calls \tcode{buf->set_emit_on_sync(true)}.
If \tcode{p} is not null, calls \tcode{p->set_emit_on_sync(true)}.
Otherwise this manipulator has no effect.
\begin{note}
To work around the issue that the
\tcode{Allocator} template argument cannot be deduced,
implementations can introduce an intermediate base class
to \tcode{basic_syncbuf} that manages its \tcode{emit_on_sync} flag.
\end{note}

\pnum
\returns
Expand All @@ -6858,12 +6870,12 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
Let \tcode{p} be \exposid{SYNCBUF}\tcode{(os.rdbuf())}.

\pnum
\effects
If \tcode{os.rdbuf()} is a
\tcode{basic_syncbuf<charT, traits, Allocator>*},
called \tcode{buf} for the purpose of exposition,
calls \tcode{buf->set_emit_on_sync(false)}.
If \tcode{p} is not null, calls \tcode{p->set_emit_on_sync(false)}.
Otherwise this manipulator has no effect.

\pnum
Expand All @@ -6878,13 +6890,13 @@
\end{itemdecl}

\begin{itemdescr}
\pnum
Let \tcode{p} be \exposid{SYNCBUF}\tcode{(os.rdbuf())}.

\pnum
\effects
Calls \tcode{os.flush()}.
Then, if \tcode{os.rdbuf()} is a
\tcode{basic_syncbuf<charT, traits, Allocator>*},
called \tcode{buf} for the purpose of exposition,
calls \tcode{buf->emit()}.
If \tcode{p} is not null, calls \tcode{p->emit()}.

\pnum
\returns
Expand Down