C++11 文件流

发布于 2024-12-07 14:06:43 字数 107 浏览 3 评论 0原文

对于异常,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不再让梦枯萎 2024-12-14 14:06:44

不会。 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文