diff --git a/appveyor.yml b/appveyor.yml index 0d85453e1..4f423e2f2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,20 +1,26 @@ version: '{build}' -configuration: - - Debug - - Release - os: - Visual Studio 2015 - Visual Studio 2017 +environment: + matrix: + - additional_flags: "" + - additional_flags: "/permissive- /std:c++latest /utf-8" + +matrix: + exclude: + - additional_flags: "/permissive- /std:c++latest /utf-8" + os: Visual Studio 2015 + init: [] install: [] build_script: - IF "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" ( SET GEN="Visual Studio 14 2015") ELSE (SET GEN="Visual Studio 15 2017") - - cmake . -G%GEN% + - cmake . -G%GEN% -DCMAKE_CXX_FLAGS="%additional_flags%" - cmake --build . --config Release test_script: diff --git a/src/json.hpp b/src/json.hpp index 98659054e..3b8925a3f 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -3729,6 +3729,9 @@ class basic_json not std::is_same::value #ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 and not std::is_same>::value +#endif +#if defined(_MSC_VER) && defined(_HAS_CXX17) && _HAS_CXX17 == 1 // fix for issue #464 + and not std::is_same::value #endif , int >::type = 0 > operator ValueType() const diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 5e90f611c..eca19ccff 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -3729,6 +3729,9 @@ class basic_json not std::is_same::value #ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 and not std::is_same>::value +#endif +#if defined(_MSC_VER) && defined(_HAS_CXX17) && _HAS_CXX17 == 1 // fix for issue #464 + and not std::is_same::value #endif , int >::type = 0 > operator ValueType() const