Debian Codegraph @

libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc

raw
1 // { dg-do run { target c++17 } }
2
3 #include <charconv>
4 #include <string>
5
6 int main()
7 {
8 #if __cpp_lib_to_chars >= 201611L // FP from_char not available otherwise.
9 // PR libstdc++/105324
10 // std::from_chars() assertion at floating_from_chars.cc:78
11 std::string s(512, '1');
12 s[1] = '.';
13 long double d;
14 std::from_chars(s.data(), s.data() + s.size(), d);
15 #endif
16 }