fix: bug in Any2String
This commit is contained in:
@ -61,9 +61,11 @@ std::string Any2String(const std::any &value) {
|
||||
buf << *ptr;
|
||||
else if (auto ptr = std::any_cast<std::string>(&value))
|
||||
buf << *ptr;
|
||||
else if (auto ptr = std::any_cast<NoneType>(&value))
|
||||
buf << "None";
|
||||
else
|
||||
throw FatalError("Any2String: unknown type");
|
||||
buf >> res;
|
||||
std::getline(buf, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user