-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filesystem wasn't introduced until C++17, so including the library is dodgy for different C++ versions, compiler and OSs. This should help, but may be incomplete.
- Loading branch information
1 parent
f12f2b7
commit 446f6fb
Showing
2 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This is a workaround for the filesystem library to work for different OSs/compiler and C++ versions | ||
#ifdef __cpp_lib_filesystem // C++17 | ||
#include <filesystem> | ||
namespace fs = std::filesystem; | ||
#elif __cpp_lib_experimental_filesystem // C++11 | ||
#include <experimental/filesystem> | ||
namespace fs = std::experimental::filesystem; | ||
#else // MacOS C++11 | ||
#include <filesystem> | ||
namespace fs = std::__fs::filesystem; | ||
#endif |