问题描述
当std::to_string
为double
时,为什么std::string
允许您将std::is_convertible_v<double,std::string>
转换为false
?例如:
#include<iostream>
#include<type_traits>
#include<string>
int main()
{
std::cout << "If double is "
<< (std::is_convertible_v<double,std::string> ? "" : "not ")
<< "convertible to std::string then why is it possible to do this? "
<< std::to_string(3.141592) << std::endl;
return 0;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)