From 1402ca486594e95ae152617ecfed4770ae90603f Mon Sep 17 00:00:00 2001 From: "Juan Carlos Arevalo Baeza (JCAB)" Date: Fri, 8 Dec 2023 14:02:53 -0800 Subject: [PATCH] Add the fix to the single_include I ran `make pretty` but that modified 20 files, performing a significant amount of indentation changes, none of them related to my change. I ran `make amalgamate`, but that did nothing. Apparently, the make rule won't run if the single_include files have already been updated by `make pretty`. I forced `make amalgamate` to do the work by touching the file with the fix. I then decided to keep just the minimal needed change: the addition of the fix to the single_include file. I just am not conversant enough in Linux to know whether I installed astyle correctly (had to clone the source from a beta branch and build, in order to get support for `--squeeze-lines`). --- single_include/nlohmann/json.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 8b72ea653..1d479ceb1 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -5697,7 +5697,14 @@ template::type; - external_constructor::construct(j, static_cast(e)); + if (std::is_unsigned::value) + { + external_constructor::construct(j, static_cast(e)); + } + else + { + external_constructor::construct(j, static_cast(e)); + } } #endif // JSON_DISABLE_ENUM_SERIALIZATION