lexical_cast的INT字符串 [英] lexical_cast int to string

查看:174
本文介绍了lexical_cast的INT字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它是安全的忽略<一个例外href=\"http://www.boost.org/doc/libs/1_42_0/libs/conversion/lexical_cast.htm\"><$c$c>boost::lexical_cast转换时 INT 的std ::字符串

推荐答案

异常词法投转换的 INT STD时提出::字符串是没有关联的转换,但资源不可用。所以,你可以在你忽略了的异常以同样的方式 bad_alloc 由运营商提出了新的忽略这个。

Exception raised by lexical cast when converting an int to std::string are not associated to the conversion, but to resource unavailable. So you can ignore this in the same way you ignore the exception bad_alloc raised by operator new.

这篇关于lexical_cast的INT字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆