Nếu chúng ta nhìn vào libstdc++ status chúng ta thấy rằng họ làm có hỗ trợ cho hệ thống tập tin TS:
Paper | Title | Status
........
N4100 | File System | Y
nhưng nó nói:
This page describes the C++14 and library TS support in mainline GCC SVN, not in any particular release.
và từ cố gắng này trên Wandbox nó trông giống như thư viện này chỉ có trên chi nhánh phát triển mới nhất 6.0
và tôi không thể tìm thấy nhiều chi tiết hơn thế nữa.
Cập nhật
Update từ Jonathan Wakely:
It's also now available in the gcc-5-branch in Subversion, and will be included in the GCC 5.3 release later this year.
Cũng phù hợp để answer here Jonathan Wakely của chúng ta cần phải biên dịch sử dụng -lstdc++fs
. Đây được bao phủ trong Linking section of gcc documents:
GCC 5.3 includes an implementation of the Filesystem library defined by the technical specification ISO/IEC TS 18822:2015. Because this is an experimental library extension, not part of the C++ standard, it is implemented in a separate library, libstdc++fs.a, and there is no shared library for it. To use the library you should include and link with -lstdc++fs. The library implementation is incomplete on non-POSIX platforms, specifically Windows support is rudimentary.
Due to the experimental nature of the Filesystem library the usual guarantees about ABI stability and backwards compatibility do not apply to it. There is no guarantee that the components in any header will remain compatible between different GCC releases.
Xem thêm Table 3.1. C++ Command Options.
Nguồn
2015-05-07 14:27:28
Có vẻ như nó hiện chỉ hoạt động [với phần đầu] (http://melpon.org/wandbox/permlink/abzPdCEgfwCCct22) –