From Jason Turner

[ostream.inserters.arithmetic]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpojit_4e9/{from.md → to.md} +56 -13
tmp/tmpojit_4e9/{from.md → to.md} RENAMED
@@ -1,21 +1,21 @@
1
  ##### Arithmetic inserters <a id="ostream.inserters.arithmetic">[[ostream.inserters.arithmetic]]</a>
2
 
3
  ``` cpp
4
- operator<<(bool val);
5
- operator<<(short val);
6
- operator<<(unsigned short val);
7
- operator<<(int val);
8
- operator<<(unsigned int val);
9
- operator<<(long val);
10
- operator<<(unsigned long val);
11
- operator<<(long long val);
12
- operator<<(unsigned long long val);
13
- operator<<(float val);
14
- operator<<(double val);
15
- operator<<(long double val);
16
- operator<<(const void* val);
17
  ```
18
 
19
  *Effects:* The classes `num_get<>` and `num_put<>` handle
20
  locale-dependent numeric formatting and parsing. These inserter
21
  functions use the imbued `locale` value to perform numeric formatting.
@@ -86,5 +86,48 @@ It provides formatting specifications such as field width, and a locale
86
  from which to obtain other facets. If `failed` is `true` then does
87
  `setstate(badbit)`, which may throw an exception, and returns.
88
 
89
  *Returns:* `*this`.
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ##### Arithmetic inserters <a id="ostream.inserters.arithmetic">[[ostream.inserters.arithmetic]]</a>
2
 
3
  ``` cpp
4
+ basic_ostream& operator<<(bool val);
5
+ basic_ostream& operator<<(short val);
6
+ basic_ostream& operator<<(unsigned short val);
7
+ basic_ostream& operator<<(int val);
8
+ basic_ostream& operator<<(unsigned int val);
9
+ basic_ostream& operator<<(long val);
10
+ basic_ostream& operator<<(unsigned long val);
11
+ basic_ostream& operator<<(long long val);
12
+ basic_ostream& operator<<(unsigned long long val);
13
+ basic_ostream& operator<<(float val);
14
+ basic_ostream& operator<<(double val);
15
+ basic_ostream& operator<<(long double val);
16
+ basic_ostream& operator<<(const void* val);
17
  ```
18
 
19
  *Effects:* The classes `num_get<>` and `num_put<>` handle
20
  locale-dependent numeric formatting and parsing. These inserter
21
  functions use the imbued `locale` value to perform numeric formatting.
 
86
  from which to obtain other facets. If `failed` is `true` then does
87
  `setstate(badbit)`, which may throw an exception, and returns.
88
 
89
  *Returns:* `*this`.
90
 
91
+ ``` cpp
92
+ basic_ostream& operator<<(const volatile void* p);
93
+ ```
94
+
95
+ *Effects:* Equivalent to:
96
+ `return operator<<(const_cast<const void*>(p));`
97
+
98
+ ``` cpp
99
+ basic_ostream& operator<<(extended-floating-point-type val);
100
+ ```
101
+
102
+ *Effects:* If the floating-point conversion rank of
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
+
129
+ If `failed` is `true` then does `setstate(badbit)`, which may throw an
130
+ exception, and returns.
131
+
132
+ *Returns:* `*this`.
133
+