Set minimum Visual Studio version to 2017 (#1820)

This commit is contained in:
Benoit Blanchon
2023-02-09 19:04:23 +01:00
parent 3d8287265c
commit e054cba610
4 changed files with 3 additions and 16 deletions

View File

@ -83,7 +83,7 @@ ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
* Well tested * Well tested
* [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x) * [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x)
* Continuously tested on * 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) * [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) * [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) * [Continuously fuzzed with Google OSS Fuzz](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:arduinojson)

View File

@ -7,11 +7,6 @@ environment:
CMAKE_GENERATOR: Visual Studio 16 2019 CMAKE_GENERATOR: Visual Studio 16 2019
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: Visual Studio 15 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 - CMAKE_GENERATOR: Ninja
MINGW: MinGW # MinGW 32-bit 5.3.0 MINGW: MinGW # MinGW 32-bit 5.3.0
- CMAKE_GENERATOR: Ninja - CMAKE_GENERATOR: Ninja

View File

@ -85,13 +85,8 @@ if(MSVC)
add_compile_options( add_compile_options(
/W4 # Set warning level /W4 # Set warning level
/WX # Treats all compiler warnings as errors. /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() endif()
if(MINGW) if(MINGW)

View File

@ -33,10 +33,7 @@ template <typename T1, typename T2>
CompareResult arithmeticCompare( CompareResult arithmeticCompare(
const T1& lhs, const T2& rhs, const T1& lhs, const T2& rhs,
typename enable_if<is_integral<T1>::value && is_integral<T2>::value && typename enable_if<is_integral<T1>::value && is_integral<T2>::value &&
sizeof(T1) < sizeof(T2), sizeof(T1) < sizeof(T2)>::type* = 0) {
int // Using int instead of void to avoid C2572 on
// Visual Studio 2012, 2013, and 2015
>::type* = 0) {
return arithmeticCompare<T2>(static_cast<T2>(lhs), rhs); return arithmeticCompare<T2>(static_cast<T2>(lhs), rhs);
} }