We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc042d6 commit cba388bCopy full SHA for cba388b
README.md
@@ -180,6 +180,15 @@ Hence, we have the following examples:
180
// result == std::numeric_limits<double>::infinity()
181
```
182
183
+Users who wish for the value to be left unmodified given `std::errc::result_out_of_range` may do so by adding two lines of code:
184
+
185
+```cpp
186
+ double old_result = result; // make copy
187
+ auto r = fast_float::from_chars(start, end, result);
188
+ if(r.ec == std::errc::result_out_of_range) { result = old_result; }
189
+```
190
191
192
## C++20: compile-time evaluation (constexpr)
193
194
In C++20, you may use `fast_float::from_chars` to parse strings
0 commit comments