From Jason Turner

[ostream.inserters.arithmetic]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpveheh0j2/{from.md → to.md} +14 -25
tmp/tmpveheh0j2/{from.md → to.md} RENAMED
@@ -23,59 +23,52 @@ When `val` is of type `bool`, `long`, `unsigned long`, `long long`,
23
  `unsigned long long`, `double`, `long double`, or `const void*`, the
24
  formatting conversion occurs as if it performed the following code
25
  fragment:
26
 
27
  ``` cpp
28
- bool failed = use_facet<
29
- num_put<charT, ostreambuf_iterator<charT, traits>>
30
- >(getloc()).put(*this, *this, fill(), val).failed();
31
  ```
32
 
33
  When `val` is of type `short` the formatting conversion occurs as if it
34
  performed the following code fragment:
35
 
36
  ``` cpp
37
  ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
38
- bool failed = use_facet<
39
- num_put<charT, ostreambuf_iterator<charT, traits>>
40
- >(getloc()).put(*this, *this, fill(),
41
  baseflags == ios_base::oct || baseflags == ios_base::hex
42
  ? static_cast<long>(static_cast<unsigned short>(val))
43
  : static_cast<long>(val)).failed();
44
  ```
45
 
46
  When `val` is of type `int` the formatting conversion occurs as if it
47
  performed the following code fragment:
48
 
49
  ``` cpp
50
  ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
51
- bool failed = use_facet<
52
- num_put<charT, ostreambuf_iterator<charT, traits>>
53
- >(getloc()).put(*this, *this, fill(),
54
  baseflags == ios_base::oct || baseflags == ios_base::hex
55
  ? static_cast<long>(static_cast<unsigned int>(val))
56
  : static_cast<long>(val)).failed();
57
  ```
58
 
59
  When `val` is of type `unsigned short` or `unsigned int` the formatting
60
  conversion occurs as if it performed the following code fragment:
61
 
62
  ``` cpp
63
- bool failed = use_facet<
64
- num_put<charT, ostreambuf_iterator<charT, traits>>
65
- >(getloc()).put(*this, *this, fill(),
66
- static_cast<unsigned long>(val)).failed();
67
  ```
68
 
69
  When `val` is of type `float` the formatting conversion occurs as if it
70
  performed the following code fragment:
71
 
72
  ``` cpp
73
- bool failed = use_facet<
74
- num_put<charT, ostreambuf_iterator<charT, traits>>
75
- >(getloc()).put(*this, *this, fill(),
76
- static_cast<double>(val)).failed();
77
  ```
78
 
79
  The first argument provides an object of the `ostreambuf_iterator<>`
80
  class which is an iterator for class `basic_ostream<>`. It bypasses
81
  `ostream`s and uses `streambuf`s directly. Class `locale` relies on
@@ -103,26 +96,22 @@ basic_ostream& operator<<(extended-floating-point-type val);
103
  *`extended-floating-point-type`* is less than or equal to that of
104
  `double`, the formatting conversion occurs as if it performed the
105
  following code fragment:
106
 
107
  ``` cpp
108
- bool failed = use_facet<
109
- num_put<charT, ostreambuf_iterator<charT, traits>>
110
- >(getloc()).put(*this, *this, fill(),
111
- static_cast<double>(val)).failed();
112
  ```
113
 
114
  Otherwise, if the floating-point conversion rank of
115
  *`extended-floating-point-type`* is less than or equal to that of
116
  `long double`, the formatting conversion occurs as if it performed the
117
  following code fragment:
118
 
119
  ``` cpp
120
- bool failed = use_facet<
121
- num_put<charT, ostreambuf_iterator<charT, traits>>
122
- >(getloc()).put(*this, *this, fill(),
123
- static_cast<long double>(val)).failed();
124
  ```
125
 
126
  Otherwise, an invocation of the operator function is conditionally
127
  supported with *implementation-defined* semantics.
128
 
 
23
  `unsigned long long`, `double`, `long double`, or `const void*`, the
24
  formatting conversion occurs as if it performed the following code
25
  fragment:
26
 
27
  ``` cpp
28
+ bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
29
+ getloc()).put(*this, *this, fill(), val).failed();
 
30
  ```
31
 
32
  When `val` is of type `short` the formatting conversion occurs as if it
33
  performed the following code fragment:
34
 
35
  ``` cpp
36
  ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
37
+ bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
38
+ getloc()).put(*this, *this, fill(),
 
39
  baseflags == ios_base::oct || baseflags == ios_base::hex
40
  ? static_cast<long>(static_cast<unsigned short>(val))
41
  : static_cast<long>(val)).failed();
42
  ```
43
 
44
  When `val` is of type `int` the formatting conversion occurs as if it
45
  performed the following code fragment:
46
 
47
  ``` cpp
48
  ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
49
+ bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
50
+ getloc()).put(*this, *this, fill(),
 
51
  baseflags == ios_base::oct || baseflags == ios_base::hex
52
  ? static_cast<long>(static_cast<unsigned int>(val))
53
  : static_cast<long>(val)).failed();
54
  ```
55
 
56
  When `val` is of type `unsigned short` or `unsigned int` the formatting
57
  conversion occurs as if it performed the following code fragment:
58
 
59
  ``` cpp
60
+ bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
61
+ getloc()).put(*this, *this, fill(), static_cast<unsigned long>(val)).failed();
 
 
62
  ```
63
 
64
  When `val` is of type `float` the formatting conversion occurs as if it
65
  performed the following code fragment:
66
 
67
  ``` cpp
68
+ bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
69
+ getloc()).put(*this, *this, fill(), static_cast<double>(val)).failed();
 
 
70
  ```
71
 
72
  The first argument provides an object of the `ostreambuf_iterator<>`
73
  class which is an iterator for class `basic_ostream<>`. It bypasses
74
  `ostream`s and uses `streambuf`s directly. Class `locale` relies on
 
96
  *`extended-floating-point-type`* is less than or equal to that of
97
  `double`, the formatting conversion occurs as if it performed the
98
  following code fragment:
99
 
100
  ``` cpp
101
+ bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
102
+ getloc()).put(*this, *this, fill(), static_cast<double>(val)).failed();
 
 
103
  ```
104
 
105
  Otherwise, if the floating-point conversion rank of
106
  *`extended-floating-point-type`* is less than or equal to that of
107
  `long double`, the formatting conversion occurs as if it performed the
108
  following code fragment:
109
 
110
  ``` cpp
111
+ bool failed = use_facet<num_put<charT, ostreambuf_iterator<charT, traits>>>(
112
+ getloc()).put(*this, *this, fill(), static_cast<long double>(val)).failed();
 
 
113
  ```
114
 
115
  Otherwise, an invocation of the operator function is conditionally
116
  supported with *implementation-defined* semantics.
117