From 6176f4281399e3aeb3f80973d0d4e7187d4715ea Mon Sep 17 00:00:00 2001 From: Walter Gray Date: Thu, 4 Jan 2018 19:30:36 -0800 Subject: [PATCH 1/3] Enable conformance mode for newer versions of visual studio - required for tuple due to changes in parameter expansion logic --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7d1579c9..74fedd399 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,12 @@ 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 " /d1parsePackExpressions-") +endif() + + add_definitions(-DGTEST_HAS_TR1_TUPLE=0) # Recurse through source directories From 4e2ae5ee480e9b2219747a742f94f730ae3a95bf Mon Sep 17 00:00:00 2001 From: Walter Gray Date: Tue, 16 Jan 2018 11:32:42 -0800 Subject: [PATCH 2/3] Fix filesystem warning in vs2017 --- src/autowiring/C++11/filesystem.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 From 1a74743ffd7dd0206f918cd6fc3e78e26e4aafde Mon Sep 17 00:00:00 2001 From: Walter Gray Date: Tue, 16 Jan 2018 11:33:11 -0800 Subject: [PATCH 3/3] Switch to using /permissive- in vs2017 --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74fedd399..40ce10c6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,10 +23,9 @@ endif() # Enable conformance mode for newer versions of MSVC if(MSVC_VERSION GREATER 1910) - string(APPEND CMAKE_CXX_FLAGS " /d1parsePackExpressions-") + string(APPEND CMAKE_CXX_FLAGS " /permissive-") endif() - add_definitions(-DGTEST_HAS_TR1_TUPLE=0) # Recurse through source directories