简体   繁体   English

实现fstream移动的C ++ 0x库

[英]C++0x library that implements move for fstreams

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). 在找到如何返回fstream(C ++ 0x)的答案后,我现在想知道是否有一个当前的c ++ 0x库为fstream实现移动(甚至交换)(因为gcc(27.9)没有) 。 I'd prefer if it was free also. 我更喜欢它是否也是免费的。

Or is there any other way return to fstreams from functions by value? 或者还有其他方式通过值从函数返回到fstream吗?

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. 我已经尝试编译libcxx,但它似乎非常特定于linux / mac,我还需要它在Solaris上运行,它不会编译。

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. 我可以解决这个问题(例如通过引用返回),但我想我会问这个,以防有一个解决方案不涉及修改调用代码。

我相信Dinkumware会出售带有可移动流的C ++标准库版本,但请务必先检查它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM