diff --git a/CMakeLists.txt b/CMakeLists.txt index e7d1579c9..40ce10c6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,11 @@ if(NOT MSVC OR MSVC_VERSION LESS 1900) ) endif() +# Enable conformance mode for newer versions of MSVC +if(MSVC_VERSION GREATER 1910) + string(APPEND CMAKE_CXX_FLAGS " /permissive-") +endif() + add_definitions(-DGTEST_HAS_TR1_TUPLE=0) # Recurse through source directories diff --git a/src/autowiring/C++11/filesystem.h b/src/autowiring/C++11/filesystem.h index 3035a0b95..d0233e610 100644 --- a/src/autowiring/C++11/filesystem.h +++ b/src/autowiring/C++11/filesystem.h @@ -2,9 +2,13 @@ #pragma once //C++17 Filesystem standard -#if defined(_MSC_VER) && _MSC_VER >= 1900 //weirdly, only MSVC 2015 supports this so far. -#include -namespace awfsnamespace = std::tr2::sys; +#if defined(_MSC_VER) && _MSC_VER >= 1900 + #include +#if _MSC_VER >= 1910 + namespace awfsnamespace = std::experimental::filesystem; + #else + namespace awfsnamespace = std::tr2::sys; + #endif #else // Experimental filesystem TS library is rare everywhere else, we have to resort to autoboost #include