C++11 文件流
对于异常,C++11 移动语义是否使 std::ifstream 和 std::ofstream 的使用变得更容易或更安全?我想这也取决于标准库。 GCC、ICC 和 VC++ 编译器之间有什么区别?
Has C++11 move semantics made the use of std::ifstream
and std::ofstream
easier or safer with regards to exceptions? I guess it depends on the standard library aswell. Any differences there between GCC, ICC and VC++ Compiler?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不会。 std::stream 类的异常安全方面并未受到影响。唯一的区别是您现在可以从工厂函数返回流并将它们存储在容器中。
No. The exception safety aspects of the std::stream classes has not been impacted. The only difference is that you can now return streams from factory functions and store them in containers.