Recently, I wanted to use from_chars
from c++17.
Looked at http://en.cppreference.com/w/cpp/utility/from_chars and found that code on this page:
#include <iostream>
#include <charconv>
#include <array>
int main()
{
std::array<char, 10> str{"42"};
int result;
std::from_chars(str.data(), str.data()+str.size(), result);
std::cout << result;
}
cannot be compiled by any of compilers. I tried on page http://en.cppreference.com/w/cpp/utility/from_chars and on godbolt with different compilers but all of them returned the same error:
<source>:2:10: fatal error: 'charconv' file not found
#include <charconv>
^~~~~~~~~~
1 error generated.
Compiler returned: 1
Can anybody help me with this, please?
(I tried clang 6.0, gcc 7.3 and msvc 19 but all of them returned error that 'charconv' not found)