Geant4-11
check_cxx_filesystem.cc
Go to the documentation of this file.
1// Check that trivial use of <filesystem> works
2// - https://en.cppreference.com/w/cpp/filesystem
3#include <iostream>
4#if __has_include( <filesystem>)
5# include <filesystem>
6namespace fs = std::filesystem;
7#elif __has_include( <experimental/filesystem>)
8# include <experimental/filesystem>
9namespace fs = std::experimental::filesystem;
10#endif
11
12int main( int argc, char* argv[] ) {
13 fs::path p{ argv[0] };
14 std::cout << p << ", " << fs::canonical( p ) << std::endl;
15}
int main(int argc, char *argv[])