Skip to content

Commit c3890ea

Browse files
committed
[ostream.inserters.arithmetic] Put use_facet use on fewer lines
This is more compact, keeps the whole template-id on a single line, and avoids some awkward page breaks.
1 parent c6297ad commit c3890ea

File tree

1 file changed

+14
-25
lines changed

1 file changed

+14
-25
lines changed

source/iostreams.tex

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6432,19 +6432,17 @@
64326432
\tcode{const void*},
64336433
the formatting conversion occurs as if it performed the following code fragment:
64346434
\begin{codeblock}
6435-
bool failed = use_facet<
6436-
num_put<charT, ostreambuf_iterator<charT, traits>>
6437-
>(getloc()).put(*this, *this, fill(), val).failed();
6435+
bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
6436+
getloc()).put(*this, *this, fill(), val).failed();
64386437
\end{codeblock}
64396438

64406439
When \tcode{val} is of type
64416440
\tcode{short}
64426441
the formatting conversion occurs as if it performed the following code fragment:
64436442
\begin{codeblock}
64446443
ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
6445-
bool failed = use_facet<
6446-
num_put<charT, ostreambuf_iterator<charT, traits>>
6447-
>(getloc()).put(*this, *this, fill(),
6444+
bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
6445+
getloc()).put(*this, *this, fill(),
64486446
baseflags == ios_base::oct || baseflags == ios_base::hex
64496447
? static_cast<long>(static_cast<unsigned short>(val))
64506448
: static_cast<long>(val)).failed();
@@ -6455,9 +6453,8 @@
64556453
the formatting conversion occurs as if it performed the following code fragment:
64566454
\begin{codeblock}
64576455
ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
6458-
bool failed = use_facet<
6459-
num_put<charT, ostreambuf_iterator<charT, traits>>
6460-
>(getloc()).put(*this, *this, fill(),
6456+
bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
6457+
getloc()).put(*this, *this, fill(),
64616458
baseflags == ios_base::oct || baseflags == ios_base::hex
64626459
? static_cast<long>(static_cast<unsigned int>(val))
64636460
: static_cast<long>(val)).failed();
@@ -6469,20 +6466,16 @@
64696466
\tcode{unsigned int}
64706467
the formatting conversion occurs as if it performed the following code fragment:
64716468
\begin{codeblock}
6472-
bool failed = use_facet<
6473-
num_put<charT, ostreambuf_iterator<charT, traits>>
6474-
>(getloc()).put(*this, *this, fill(),
6475-
static_cast<unsigned long>(val)).failed();
6469+
bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
6470+
getloc()).put(*this, *this, fill(), static_cast<unsigned long>(val)).failed();
64766471
\end{codeblock}
64776472

64786473
When \tcode{val} is of type
64796474
\tcode{float}
64806475
the formatting conversion occurs as if it performed the following code fragment:
64816476
\begin{codeblock}
6482-
bool failed = use_facet<
6483-
num_put<charT, ostreambuf_iterator<charT, traits>>
6484-
>(getloc()).put(*this, *this, fill(),
6485-
static_cast<double>(val)).failed();
6477+
bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
6478+
getloc()).put(*this, *this, fill(), static_cast<double>(val)).failed();
64866479
\end{codeblock}
64876480

64886481
\pnum
@@ -6539,20 +6532,16 @@
65396532
is less than or equal to that of \tcode{double},
65406533
the formatting conversion occurs as if it performed the following code fragment:
65416534
\begin{codeblock}
6542-
bool failed = use_facet<
6543-
num_put<charT, ostreambuf_iterator<charT, traits>>
6544-
>(getloc()).put(*this, *this, fill(),
6545-
static_cast<double>(val)).failed();
6535+
bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
6536+
getloc()).put(*this, *this, fill(), static_cast<double>(val)).failed();
65466537
\end{codeblock}
65476538
Otherwise,
65486539
if the floating-point conversion rank of \tcode{\placeholder{extended-floating-point-type}}
65496540
is less than or equal to that of \tcode{long double},
65506541
the formatting conversion occurs as if it performed the following code fragment:
65516542
\begin{codeblock}
6552-
bool failed = use_facet<
6553-
num_put<charT, ostreambuf_iterator<charT, traits>>
6554-
>(getloc()).put(*this, *this, fill(),
6555-
static_cast<long double>(val)).failed();
6543+
bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
6544+
getloc()).put(*this, *this, fill(), static_cast<long double>(val)).failed();
65566545
\end{codeblock}
65576546
Otherwise, an invocation of the operator function is conditionally supported
65586547
with \impldef{\tcode{operator<<} for large extended floating-point types}

0 commit comments

Comments
 (0)