diff --git a/cmake/test/testFloatFromChars.cpp b/cmake/test/testFloatFromChars.cpp new file mode 100644 index 000000000..859ef3f11 --- /dev/null +++ b/cmake/test/testFloatFromChars.cpp @@ -0,0 +1,11 @@ +// CMake feature test for floating-point std::from_chars() support + +#include +#include + +int main() +{ + const auto s = std::string_view { "2.71828" }; + auto e = 0.0; + std::from_chars(s.data(), s.data() + s.size(), e); +}