Skip to content

Commit 0458c20

Browse files
committed
adding missing file
1 parent 81b8306 commit 0458c20

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/p2497.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)