diff options
author | Jack Lloyd <[email protected]> | 2018-05-14 10:39:44 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-05-14 10:39:44 -0400 |
commit | 1773c9a43315bf27b44b89e28396abf8e0f05409 (patch) | |
tree | f7b1f84aaa9a28be11a4a5519cd8ac9f7fce5a25 /src/lib/utils/filesystem.cpp | |
parent | 8f3f7743472ba625a0bb249cd06651ed13325b87 (diff) | |
parent | 05abe208647f6ae112bed0a1a8cee794a55fcfa5 (diff) |
Merge GH #1567 Fixes for C++17 mode compilation under MSVC
Diffstat (limited to 'src/lib/utils/filesystem.cpp')
-rw-r--r-- | src/lib/utils/filesystem.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/utils/filesystem.cpp b/src/lib/utils/filesystem.cpp index 9ce23d0c6..fbfafdf5b 100644 --- a/src/lib/utils/filesystem.cpp +++ b/src/lib/utils/filesystem.cpp @@ -35,17 +35,21 @@ namespace { #if defined(BOTAN_TARGET_OS_HAS_STL_FILESYSTEM_MSVC) && defined(BOTAN_BUILD_COMPILER_IS_MSVC) std::vector<std::string> impl_stl_filesystem(const std::string& dir) { +#if (_MSVC_LANG >= 201703L) + using namespace std::filesystem; +#else using namespace std::tr2::sys; +#endif std::vector<std::string> out; path p(dir); - if (is_directory(p)) + if(is_directory(p)) { - for (recursive_directory_iterator itr(p), end; itr != end; ++itr) + for(recursive_directory_iterator itr(p), end; itr != end; ++itr) { - if (is_regular_file(itr->path())) + if(is_regular_file(itr->path())) { out.push_back(itr->path().string()); } |