diff --git a/3rdparty/Boost/boost/math/special_functions/nonfinite_num_facets.hpp b/3rdparty/Boost/boost/math/special_functions/nonfinite_num_facets.hpp
index 8ee9170..286d109 100644
a
|
b
|
namespace boost {
|
99 | 99 | if(flags_ & trap_infinity) |
100 | 100 | throw std::ios_base::failure("Infinity"); |
101 | 101 | else if((boost::math::signbit)(val)) |
102 | | put_num_and_fill(it, iosb, "-", "inf", fill); |
| 102 | put_num_and_fill(it, iosb, "-", "inf", fill, val); |
103 | 103 | else if(iosb.flags() & std::ios_base::showpos) |
104 | | put_num_and_fill(it, iosb, "+", "inf", fill); |
| 104 | put_num_and_fill(it, iosb, "+", "inf", fill, val); |
105 | 105 | else |
106 | | put_num_and_fill(it, iosb, "", "inf", fill); |
| 106 | put_num_and_fill(it, iosb, "", "inf", fill, val); |
107 | 107 | break; |
108 | 108 | |
109 | 109 | case FP_NAN: |
110 | 110 | if(flags_ & trap_nan) |
111 | 111 | throw std::ios_base::failure("NaN"); |
112 | 112 | else if((boost::math::signbit)(val)) |
113 | | put_num_and_fill(it, iosb, "-", "nan", fill); |
| 113 | put_num_and_fill(it, iosb, "-", "nan", fill, val); |
114 | 114 | else if(iosb.flags() & std::ios_base::showpos) |
115 | | put_num_and_fill(it, iosb, "+", "nan", fill); |
| 115 | put_num_and_fill(it, iosb, "+", "nan", fill, val); |
116 | 116 | else |
117 | | put_num_and_fill(it, iosb, "", "nan", fill); |
| 117 | put_num_and_fill(it, iosb, "", "nan", fill, val); |
118 | 118 | break; |
119 | 119 | |
120 | 120 | case FP_ZERO: |
121 | | if(flags_ & signed_zero) { |
122 | | if((boost::math::signbit)(val)) |
123 | | put_num_and_fill(it, iosb, "-", "0", fill); |
124 | | else if(iosb.flags() & std::ios_base::showpos) |
125 | | put_num_and_fill(it, iosb, "+", "0", fill); |
126 | | else |
127 | | put_num_and_fill(it, iosb, "", "0", fill); |
| 121 | if((flags_ & signed_zero) && ((boost::math::signbit)(val))) { |
| 122 | put_num_and_fill(it, iosb, "-", 0, fill, val); |
| 123 | } else { |
| 124 | put_num_and_fill(it, iosb, 0, 0, fill, val); |
128 | 125 | } |
129 | | else |
130 | | put_num_and_fill(it, iosb, "", "0", fill); |
131 | 126 | break; |
132 | 127 | |
133 | 128 | default: |
… |
… |
namespace boost {
|
137 | 132 | } |
138 | 133 | } |
139 | 134 | |
| 135 | template<class ValType> |
140 | 136 | void put_num_and_fill( |
141 | 137 | OutputIterator& it, std::ios_base& iosb, const char* prefix, |
142 | | const char* body, CharType fill) const |
| 138 | const char* body, CharType fill, ValType val) const |
143 | 139 | { |
144 | | int width = (int)strlen(prefix) + (int)strlen(body); |
| 140 | int prefix_length = prefix ? (int)std::strlen(prefix) : 0; |
| 141 | int body_length = prefix ? (int)std::strlen(body) : 0; |
| 142 | int width = prefix_length + body_length; |
145 | 143 | std::ios_base::fmtflags adjust |
146 | 144 | = iosb.flags() & std::ios_base::adjustfield; |
147 | 145 | const std::ctype<CharType>& ct |
148 | 146 | = std::use_facet<std::ctype<CharType> >(iosb.getloc()); |
149 | 147 | |
150 | | if(adjust != std::ios_base::internal && adjust != std::ios_base::left) |
151 | | put_fill(it, iosb, fill, width); |
| 148 | if(body || prefix) |
| 149 | if(adjust != std::ios_base::internal && adjust != std::ios_base::left) |
| 150 | put_fill(it, iosb, fill, width); |
152 | 151 | |
153 | | while(*prefix) |
154 | | *it = ct.widen(*(prefix++)); |
| 152 | if(prefix) { |
| 153 | while(*prefix) |
| 154 | *it = ct.widen(*(prefix++)); |
| 155 | iosb.width( iosb.width() - prefix_length ); |
| 156 | width -= prefix_length; |
| 157 | } |
155 | 158 | |
156 | | if(adjust == std::ios_base::internal) |
157 | | put_fill(it, iosb, fill, width); |
| 159 | if(body) { |
| 160 | if(adjust == std::ios_base::internal) |
| 161 | put_fill(it, iosb, fill, width); |
158 | 162 | |
159 | | if(iosb.flags() & std::ios_base::uppercase) { |
160 | | while(*body) |
161 | | *it = ct.toupper(ct.widen(*(body++))); |
| 163 | if(iosb.flags() & std::ios_base::uppercase) { |
| 164 | while(*body) |
| 165 | *it = ct.toupper(ct.widen(*(body++))); |
| 166 | } |
| 167 | else { |
| 168 | while(*body) |
| 169 | *it = ct.widen(*(body++)); |
| 170 | } |
| 171 | |
| 172 | if(adjust == std::ios_base::left) |
| 173 | put_fill(it, iosb, fill, width); |
162 | 174 | } |
163 | 175 | else { |
164 | | while(*body) |
165 | | *it = ct.widen(*(body++)); |
| 176 | it = std::num_put<CharType, OutputIterator>::do_put( |
| 177 | it, iosb, fill, val); |
166 | 178 | } |
167 | | |
168 | | if(adjust == std::ios_base::left) |
169 | | put_fill(it, iosb, fill, width); |
170 | 179 | } |
171 | 180 | |
172 | 181 | void put_fill( |