From 0458c20061669b63c0d52cbc2d95bf9dfaed8a25 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Mon, 19 May 2025 18:09:34 -0400 Subject: [PATCH] adding missing file --- tests/p2497.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/p2497.cpp diff --git a/tests/p2497.cpp b/tests/p2497.cpp new file mode 100644 index 0000000..7e085a5 --- /dev/null +++ b/tests/p2497.cpp @@ -0,0 +1,15 @@ +#include "fast_float/fast_float.h" + +#include +#include + +int main() { + std::string input = "3.1416 xyz "; + double result; + if(auto answer = fast_float::from_chars(input.data(), input.data() + input.size(), result)) { + std::cout << "parsed the number " << result << std::endl; + return EXIT_SUCCESS; + } + std::cerr << "failed to parse " << result << std::endl; + return EXIT_FAILURE; +} \ No newline at end of file