mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
Updated readme.
This commit is contained in:
parent
90bab0edee
commit
217fb2bdf5
@ -100,7 +100,7 @@ If you want to also use the `fstream` wrapper with `path` support as fallback,
|
||||
you might use:
|
||||
|
||||
```cpp
|
||||
#if defined(__has_include) && __has_include(<filesystem>)
|
||||
#if defined(__cplusplus) && __cplusplus >= 201703L && defined(__has_include) && __has_include(<filesystem>)
|
||||
#include <filesystem>
|
||||
namespace fs {
|
||||
using namespace std::filesystem;
|
||||
@ -119,6 +119,9 @@ using fstream = ghc::filesystem::fstream;
|
||||
#endif
|
||||
```
|
||||
|
||||
Now you have e.g. `fs::ofstream out(somePath);` and it is either the wrapper or
|
||||
the C++17 `std::ofstream`.
|
||||
|
||||
Be aware, as a header-only library, it is not hiding the fact, that it
|
||||
uses system includes, so they "pollute" your global namespace.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user