From e054cba610b741c5908b110926b10f5d1fca9801 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Thu, 9 Feb 2023 19:04:23 +0100 Subject: [PATCH] Set minimum Visual Studio version to 2017 (#1820) --- README.md | 2 +- appveyor.yml | 5 ----- extras/CompileOptions.cmake | 7 +------ src/ArduinoJson/Numbers/arithmeticCompare.hpp | 5 +---- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b0f539dd..1b2bb38b 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things). * Well tested * [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x) * Continuously tested on - * [Visual Studio 2010, 2012, 2013, 2015, 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/6.x) + * [Visual Studio 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/6.x) * [GCC 4.4, 4.6, 4.7, 4.8, 4.9, 5, 6, 7, 8, 9, 10, 11](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22) * [Clang 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 5.0, 6.0, 7, 8, 9, 10](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22) * [Continuously fuzzed with Google OSS Fuzz](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:arduinojson) diff --git a/appveyor.yml b/appveyor.yml index 06681d4a..90fba893 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,11 +7,6 @@ environment: CMAKE_GENERATOR: Visual Studio 16 2019 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 CMAKE_GENERATOR: Visual Studio 15 2017 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - CMAKE_GENERATOR: Visual Studio 14 2015 - - CMAKE_GENERATOR: Visual Studio 12 2013 - - CMAKE_GENERATOR: Visual Studio 11 2012 - - CMAKE_GENERATOR: Visual Studio 10 2010 - CMAKE_GENERATOR: Ninja MINGW: MinGW # MinGW 32-bit 5.3.0 - CMAKE_GENERATOR: Ninja diff --git a/extras/CompileOptions.cmake b/extras/CompileOptions.cmake index 82a750a1..9eadfa6a 100644 --- a/extras/CompileOptions.cmake +++ b/extras/CompileOptions.cmake @@ -85,13 +85,8 @@ if(MSVC) add_compile_options( /W4 # Set warning level /WX # Treats all compiler warnings as errors. + /Zc:__cplusplus # Enable updated __cplusplus macro ) - - if (NOT MSVC_VERSION LESS 1910) # >= Visual Studio 2017 - add_compile_options( - /Zc:__cplusplus # Enable updated __cplusplus macro - ) - endif() endif() if(MINGW) diff --git a/src/ArduinoJson/Numbers/arithmeticCompare.hpp b/src/ArduinoJson/Numbers/arithmeticCompare.hpp index 515bc4e6..fb0c9975 100644 --- a/src/ArduinoJson/Numbers/arithmeticCompare.hpp +++ b/src/ArduinoJson/Numbers/arithmeticCompare.hpp @@ -33,10 +33,7 @@ template CompareResult arithmeticCompare( const T1& lhs, const T2& rhs, typename enable_if::value && is_integral::value && - sizeof(T1) < sizeof(T2), - int // Using int instead of void to avoid C2572 on - // Visual Studio 2012, 2013, and 2015 - >::type* = 0) { + sizeof(T1) < sizeof(T2)>::type* = 0) { return arithmeticCompare(static_cast(lhs), rhs); }