add array.h/cpp
This commit is contained in:
1 parent
f44aaa81b2
commit
d0fd9eb4f0
7 files changed
+410
No files matched your search
@@ -0,0 +1,7 @@
|
||||
message(STATUS "Checking that std::from_chars for floats is supported by the C++ library")
|
||||
try_compile(FROM_CHARS_WORKS "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_LIST_DIR}/check-from_chars.cpp")
|
||||
if(FROM_CHARS_WORKS)
|
||||
message(STATUS "Checking that std::from_chars for floats is supported by the C++ library - yes")
|
||||
else()
|
||||
message(STATUS "Checking that std::from_chars for floats is supported by the C++ library - NO")
|
||||
endif()
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <charconv>
|
||||
|
||||
int main()
|
||||
{
|
||||
const char str[] = "1.2345e3";
|
||||
float num;
|
||||
std::from_chars(str, str + sizeof str - 1, num);
|
||||
}
|
||||
Reference in new issue
Block a user