不能正确解析integer
Closed this issue · 3 comments
ntzxtyz commented
std::string的data()内容如下:
{
"code": 0,
"session": "sIMIG9Fe"
}
抛出一下错误:
terminate called after throwing an instance of 'configor::configor_type_error'
what(): config type error: cannot convert type 'string' to type 'integer' (implicitly)
ntzxtyz commented
试着static-cast成string,又抛“不能把integer转换为string”了
Nomango commented
不能使用static_cast转换是因为类型本身就不可以转换,比如下面的代码本身就是错误的
int i = 10;
std::string str = static_cast<std::string>(i);