diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 9493b1ec8..754a484a5 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -4889,7 +4889,8 @@ class binary_reader { // a string that is in the block of input as a whole is appended from // it, without the zero-filling resize() below - if (append_from_block(len, result, std::integral_constant < bool, bulk_scan && std::is_same::value > {})) + constexpr bool from_block = bulk_scan && std::is_same::value; + if (append_from_block(len, result, std::integral_constant {})) { return true; } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index aeb12e87b..e171ec85d 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -22905,7 +22905,8 @@ class binary_reader { // a string that is in the block of input as a whole is appended from // it, without the zero-filling resize() below - if (append_from_block(len, result, std::integral_constant < bool, bulk_scan && std::is_same::value > {})) + constexpr bool from_block = bulk_scan && std::is_same::value; + if (append_from_block(len, result, std::integral_constant {})) { return true; }