I found this page, describing the changes between c++14 and c++17:
https://isocpp.org/files/papers/p0636r0.html
... It links to this page, which describes the proposed filesystem changes:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0218r0.html
I skimmed through it. There are small wording changes to the standard, but the only code change I saw were namespace changes that removed the "experimental" and "v1" parts, so "std::experimental::filesystem::v1" became "std::filesystem", which is expected.
From what I can tell, nothing other than the namespace path changed. Does anyone know if anything else changed?
In other words, I'm using gcc with -std=c++14. Can I write code now with std::experimental::filesystem and comfortably switch to -std=c++17 in the future with only this namespace change?
Closest questions I can find to being duplicates:
How similar are Boost filesystem and the standard C++ filesystem libraries?
Are the experimental features of modern C++ reliable for long-term projects?
Most modern file systems keep the files organized in a tree-like (or hierarchical) form. One or more root nodes are located at the tree's top. The filesystem is a library in C++17 standard which enables us to work with the file path, directories, status, and errors of the files in a hierarchical filesystem.
The Boost Filesystem Library provides portable facilities to query and manipulate paths, files, and directories. The motivation for the library is the need to be able to perform portable script-like operations from within C++ programs.
The Filesystem library provides facilities for performing operations on file systems and their components, such as paths, regular files, and directories. The filesystem library was originally developed as boost.
The major papers making changes to the filesystem library are
directory_entry
There are also some relatively minor fixes and changes that can be found in the LWG issue list. Look for issues with "C++17" status. Note that some of these changes are then superseded by the papers listed above.
For existing Filesystem TS code, I expect that P0492R2 is the one that matters the most, since the remaining papers are mostly feature additions rather than changes. P0492R2 includes both technical clarifications and significant semantic changes. Some in the latter category that immediately come to mind are:
path(".profile").stem()
is now ".profile"
operator/
on path
had its semantics changed significantly if the rhs is an absolute path or has a root-name. path("/foo") / "/bar"
is now "/bar"
rather than "/foo/bar"
; path("C:\\x") / "D:y"
on Windows is now "D:y"
.absolute
is gone. system_complete
has been renamed absolute
.permissions
's signature got a minor change.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With