实现 fstream 移动的 C++0x 库
找到如何返回 fstream (C++0x) 的答案后,我现在想知道是否有一个当前的 c++0x 库可以实现 fstream 的移动(甚至交换)(如 gcc (27.9) 没有)。我更希望它也是免费的。
或者还有其他方法按值从函数返回 fstreams 吗?
我尝试编译 libcxx 但它似乎非常特定于 linux/mac,我需要它在 Solaris 上运行另外,它也无法编译。
我可以解决这个问题(例如通过引用返回),但我想我会问这个,以防万一有一个不涉及修改调用代码的解决方案。
After finding the answer to How to return an fstream (C++0x), I was now wondering if there is a current c++0x library that implements move (or even swap) for fstreams (as gcc (27.9) does not). I'd prefer if it was free also.
Or is there any other way return to fstreams from functions by value?
I've tried compiling libcxx but it seems very linux/mac specific, and I need it to run on Solaris also, which it wouldn't compile on.
I can work around this issue (return by reference for example), but I thought I'd ask this just in case there was a solution that doesn't involve modifying the calling code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信 Dinkumware 出售带有可移动流的 C++ 标准库版本,但请务必先检查一下。
I believe Dinkumware sells a version of the C++ Standard Library with movable streams, but be sure to check it first.