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 81b8306 commit 0458c20Copy full SHA for 0458c20
tests/p2497.cpp
@@ -0,0 +1,15 @@
1
+#include "fast_float/fast_float.h"
2
+
3
+#include <iostream>
4
+#include <string>
5
6
+int main() {
7
+ std::string input = "3.1416 xyz ";
8
+ double result;
9
+ if(auto answer = fast_float::from_chars(input.data(), input.data() + input.size(), result)) {
10
+ std::cout << "parsed the number " << result << std::endl;
11
+ return EXIT_SUCCESS;
12
+ }
13
+ std::cerr << "failed to parse " << result << std::endl;
14
+ return EXIT_FAILURE;
15
+}
0 commit comments