aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/utils/compiler.h11
-rw-r--r--src/lib/utils/filesystem.cpp10
2 files changed, 17 insertions, 4 deletions
diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h
index 68fc51e6d..202b5cb75 100644
--- a/src/lib/utils/compiler.h
+++ b/src/lib/utils/compiler.h
@@ -137,7 +137,7 @@
/*
* Define BOTAN_CURRENT_FUNCTION
*/
-#if defined(_MSC_VER)
+#if defined(BOTAN_BUILD_COMPILER_IS_MSVC_2013)
#define BOTAN_CURRENT_FUNCTION __FUNCTION__
#else
#define BOTAN_CURRENT_FUNCTION __func__
@@ -155,6 +155,15 @@
#endif
/*
+* Define BOTAN_CONSTEXPR (for MSVC 2013)
+*/
+#if defined(BOTAN_BUILD_COMPILER_IS_MSVC_2013)
+ #define BOTAN_CONSTEXPR /**/
+#else
+ #define BOTAN_CONSTEXPR constexpr
+#endif
+
+/*
* Define BOTAN_ALIGNAS (for MSVC 2013)
*/
#if defined(BOTAN_BUILD_COMPILER_IS_MSVC_2013)
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());
}