Skip to content

Instantly share code, notes, and snippets.

@Jacob-Tate
Created December 4, 2019 06:21
Show Gist options
  • Save Jacob-Tate/5a51d4afdd054e1fac32535567b27cc8 to your computer and use it in GitHub Desktop.
Save Jacob-Tate/5a51d4afdd054e1fac32535567b27cc8 to your computer and use it in GitHub Desktop.
Include the correct std::filesystem
//
// https://en.cppreference.com/w/User:D41D8CD98F/feature_testing_macros
//
#include <vector>
#if defined(__cpp_lib_filesystem)
#include <filesystem>
#else
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <experimental/filesystem>
namespace std {
namespace filesystem = experimental::filesystem;
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment