From d4e49873b74f54edd9446ef2b85f4f82063530c1 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 8 Apr 2017 21:56:42 +0200 Subject: [PATCH 01/11] :construction_worker: experimenting with configurations --- appveyor.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index fc410e451..0d85453e1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,12 +1,21 @@ version: '{build}' + +configuration: + - Debug + - Release + os: -- Visual Studio 2015 -- Visual Studio 2017 + - Visual Studio 2015 + - Visual Studio 2017 + 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 --build . --config Release + - 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 --build . --config Release + test_script: -- ctest -C Release -V + - ctest -C Release -V From 9d9c5216d766f1b4d2e3ac4031064e27951ddcdb Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 9 Apr 2017 10:59:45 +0200 Subject: [PATCH 02/11] :construction_worker: additional flags for MSVC #464 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test a fix for issue #464 (not yet implemented), we first need to have an MSVC build with “/permissive- /std:c++latest /utf-8”. --- appveyor.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0d85453e1..cabfd1430 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,13 +8,17 @@ os: - Visual Studio 2015 - Visual Studio 2017 +environment: + - additional_flags: "${CMAKE_CXXFLAGS}" + - additional_flags: "${CMAKE_CXXFLAGS} /permissive- /std:c++latest /utf-8" + 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: From d3d87674c8fad6af27d018b74c547d3a37249195 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 9 Apr 2017 11:00:39 +0200 Subject: [PATCH 03/11] :construction_worker: fixed AppVeyor syntax --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index cabfd1430..409f5230d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,6 +9,7 @@ os: - Visual Studio 2017 environment: + matrix: - additional_flags: "${CMAKE_CXXFLAGS}" - additional_flags: "${CMAKE_CXXFLAGS} /permissive- /std:c++latest /utf-8" From 180d249f6c78e7699798ef2a818bedd4f2dd11be Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 9 Apr 2017 11:38:42 +0200 Subject: [PATCH 04/11] :construction_worker: another try --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 409f5230d..f1122d593 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,8 +10,8 @@ os: environment: matrix: - - additional_flags: "${CMAKE_CXXFLAGS}" - - additional_flags: "${CMAKE_CXXFLAGS} /permissive- /std:c++latest /utf-8" + - additional_flags: "" + - additional_flags: "/permissive- /std:c++latest /utf-8" init: [] @@ -19,7 +19,7 @@ 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% -DCMAKE_CXX_FLAGS=%additional_flags% + - cmake . -G%GEN% -DCMAKE_CXX_FLAGS="${CMAKE_CXXFLAGS} %additional_flags%" - cmake --build . --config Release test_script: From a9f409458099a2bcb72f9d2d476b37e26483f25a Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 9 Apr 2017 11:47:31 +0200 Subject: [PATCH 05/11] :construction_worker: another try --- appveyor.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f1122d593..1832f28cf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,5 @@ version: '{build}' -configuration: - - Debug - - Release - os: - Visual Studio 2015 - Visual Studio 2017 @@ -19,7 +15,7 @@ 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% -DCMAKE_CXX_FLAGS="${CMAKE_CXXFLAGS} %additional_flags%" + - cmake . -G%GEN% -DCMAKE_CXX_FLAGS="%additional_flags%" - cmake --build . --config Release test_script: From c40c8ac92e9a34ddb417478ac7c52c5716aa401b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 9 Apr 2017 12:00:30 +0200 Subject: [PATCH 06/11] :construction_worker: excluding MSVC 2015 with "/permissive- /std:c++latest /utf-8" --- appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 1832f28cf..4f423e2f2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,6 +9,11 @@ environment: - 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: [] From 628be157a27f71b4f045fc687d723f9e1bbdfc51 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 9 Apr 2017 13:52:04 +0200 Subject: [PATCH 07/11] :bug: added fix for #464 --- src/json.hpp | 3 +++ src/json.hpp.re2c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/json.hpp b/src/json.hpp index 98659054e..bdbd351bb 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) // 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..6710233cf 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) // fix for issue #464 + and not std::is_same::value #endif , int >::type = 0 > operator ValueType() const From e48114bbd6625e6199baa10cbfe783bb95c32604 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 9 Apr 2017 14:02:04 +0200 Subject: [PATCH 08/11] :hammer: check for value of _HAS_CXX17 --- src/json.hpp | 2 +- src/json.hpp.re2c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index bdbd351bb..3b8925a3f 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -3730,7 +3730,7 @@ class basic_json #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) // fix for issue #464 +#if defined(_MSC_VER) && defined(_HAS_CXX17) && _HAS_CXX17 == 1 // fix for issue #464 and not std::is_same::value #endif , int >::type = 0 > diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 6710233cf..eca19ccff 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -3730,7 +3730,7 @@ class basic_json #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) // fix for issue #464 +#if defined(_MSC_VER) && defined(_HAS_CXX17) && _HAS_CXX17 == 1 // fix for issue #464 and not std::is_same::value #endif , int >::type = 0 > From 5bea6f383af7e2d019f4f95d03775daf8860b908 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 11 Apr 2017 18:57:53 +0200 Subject: [PATCH 09/11] :pencil2: fixed a typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8174fa8a..265ec06f1 100644 --- a/README.md +++ b/README.md @@ -841,7 +841,7 @@ Thanks a lot for helping out! Please [let me know](mailto:mail@nlohmann.me) if I ## Used third-party tools -The library itself contains of a single header file licensed under the MIT license. However, it is built, tested, documented, and whatnot using a lot of thirs-party tools and services. Thanks a lot! +The library itself contains of a single header file licensed under the MIT license. However, it is built, tested, documented, and whatnot using a lot of third-party tools and services. Thanks a lot! - [**American fuzzy lop**](http://lcamtuf.coredump.cx/afl/) for fuzz testing - [**AppVeyor**](https://www.appveyor.com) for [continuous integration](https://ci.appveyor.com/project/nlohmann/json) on Windows From ef55626296db745f382629ba0c31ef58e2f3b58a Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 11 Apr 2017 20:37:38 +0200 Subject: [PATCH 10/11] :construction_worker: added Clang 3.9-5.0 Taken from https://github.com/travis-ci/docs-travis-ci-com/pull/746/files. --- .travis.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8b9ba53ee..f69283b0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -207,6 +207,27 @@ matrix: env: LLVM_VERSION=3.8.1 compiler: clang + - os: linux + addons: + apt: + sources: llvm-toolchain-trusty-3.9 + packages: clang-3.9 + env: COMPILER=clang++-3.9 + + - os: linux + addons: + apt: + sources: llvm-toolchain-trusty-4.0 + packages: clang-4.0 + env: COMPILER=clang++-4.0 + + - os: linux + addons: + apt: + sources: llvm-toolchain-trusty + packages: clang-5.0 + env: COMPILER=clang++-5.0 + ##################### # installation step # ##################### From 42b4cdd4d00a0289932fe6af1f71c0a875041cc3 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 11 Apr 2017 22:13:26 +0200 Subject: [PATCH 11/11] :construction_worker: Travis is very picky --- .travis.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index f69283b0d..0d7026b0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -207,26 +207,26 @@ matrix: env: LLVM_VERSION=3.8.1 compiler: clang - - os: linux - addons: - apt: - sources: llvm-toolchain-trusty-3.9 - packages: clang-3.9 - env: COMPILER=clang++-3.9 - - - os: linux - addons: - apt: - sources: llvm-toolchain-trusty-4.0 - packages: clang-4.0 - env: COMPILER=clang++-4.0 - - - os: linux - addons: - apt: - sources: llvm-toolchain-trusty - packages: clang-5.0 - env: COMPILER=clang++-5.0 +# - os: linux +# addons: +# apt: +# sources: llvm-toolchain-trusty-3.9 +# packages: clang-3.9 +# env: COMPILER=clang++-3.9 +# +# - os: linux +# addons: +# apt: +# sources: llvm-toolchain-trusty-4.0 +# packages: clang-4.0 +# env: COMPILER=clang++-4.0 +# +# - os: linux +# addons: +# apt: +# sources: llvm-toolchain-trusty +# packages: clang-5.0 +# env: COMPILER=clang++-5.0 ##################### # installation step #