Workaround for gcc 10

This commit is contained in:
2024-02-08 22:51:08 +01:00
parent 033a34e248
commit bf690339b4
+4
View File
@@ -442,10 +442,14 @@ String Variant::toString() const
ss << "{"; ss << "{";
for(int o=0; o<matrix.cols(); o++) for(int o=0; o<matrix.cols(); o++)
{ {
#if __GNUC__ >= 11 || __clang__
char str[128] = {0}; char str[128] = {0};
char *end = str + sizeof(str); char *end = str + sizeof(str);
std::to_chars(str, end, matrix(i, o)); std::to_chars(str, end, matrix(i, o));
ss << str; ss << str;
#else
ss << std::to_string(matrix(i, o));
#endif
if(o < matrix.cols() - 1) if(o < matrix.cols() - 1)
ss << ","; ss << ",";
} }