Merge develop into perf/view-compare

Develop fixed the VS 2015 build of the DOM parser itself (#5916): its
json_sax.hpp is kept, so this branch no longer changes the file.
single_include is a fresh amalgamation.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-25 12:13:26 +01:00
commit d4faace387
419 files changed
+2622 -842

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@
#include <vector>
#include <test_data.hpp>
using json = nlohmann::json;
using nlohmann::json;
//////////////////////////////////////////////////////////////////////////////
// parse JSON from file
+2 -2
View File
@@ -17,8 +17,8 @@
#include <string>
#include <test_data.hpp>
using json = nlohmann::json;
using json_document = nlohmann::json_document;
using nlohmann::json;
using nlohmann::json_document;
static std::string read_file(const char* filename)
{
+2 -2
View File
@@ -33,8 +33,8 @@ drivers.
#error "the fuzzer drivers must be built without NDEBUG"
#endif
using json = nlohmann::json;
using json_document = nlohmann::json_document;
using nlohmann::json;
using nlohmann::json_document;
using image_check = json_document::image_check;
// see http://llvm.org/docs/LibFuzzer.html
+2 -2
View File
@@ -42,8 +42,8 @@ drivers.
#error "the fuzzer drivers must be built without NDEBUG"
#endif
using json = nlohmann::json;
using json_document = nlohmann::json_document;
using nlohmann::json;
using nlohmann::json_document;
namespace
{
+1 -1
View File
@@ -19,7 +19,7 @@
#include <nlohmann/json.hpp>
using nlohmann::json;
using ordered_json = nlohmann::ordered_json;
using nlohmann::ordered_json;
#include <algorithm>
#include <climits>
+1 -1
View File
@@ -14,7 +14,7 @@
#define JSON_DIAGNOSTIC_POSITIONS 1
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
TEST_CASE("Better diagnostics with positions")
{
+1 -1
View File
@@ -13,7 +13,7 @@ DOCTEST_GCC_SUPPRESS_WARNING_PUSH
DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept")
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
#ifdef JSON_TEST_NO_GLOBAL_UDLS
using namespace nlohmann::literals; // NOLINT(google-build-using-namespace)
#endif
+3 -3
View File
@@ -1948,7 +1948,7 @@ TEST_CASE_TEMPLATE("element access 2 (additional value() tests)", Json, nlohmann
#ifdef JSON_HAS_CPP_17
TEST_CASE("operator[] with user-defined std::string_view-convertible types")
{
using json = nlohmann::json;
using nlohmann::json;
class TestClass
{
@@ -2031,7 +2031,7 @@ TEST_CASE("keys convertible to std::string_view work with all lookup functions (
SECTION("nlohmann::json")
{
using json = nlohmann::json;
using nlohmann::json;
SECTION("ViewKey")
{
@@ -2072,7 +2072,7 @@ TEST_CASE("keys convertible to std::string_view work with all lookup functions (
SECTION("nlohmann::ordered_json")
{
using ordered_json = nlohmann::ordered_json;
using nlohmann::ordered_json;
SECTION("ViewKey")
{
+1 -1
View File
@@ -15,7 +15,7 @@
#include "doctest_compatibility.h"
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
/////////////////////////////////////////////////////////////////////
// for #4825 - explicitly instantiating basic_json must compile; this
+2 -2
View File
@@ -9,8 +9,8 @@
#include "doctest_compatibility.h"
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using ordered_json = nlohmann::ordered_json;
using nlohmann::json;
using nlohmann::ordered_json;
namespace
{
+2 -2
View File
@@ -9,8 +9,8 @@
#include "doctest_compatibility.h"
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using ordered_json = nlohmann::ordered_json;
using nlohmann::json;
using nlohmann::ordered_json;
#include <limits>
#include <set>
+1 -1
View File
@@ -19,7 +19,7 @@
#include <utility>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
// An argument type whose associated namespace is the library namespace, so
// argument-dependent lookup of a literal operator called by its function name
+1 -1
View File
@@ -38,7 +38,7 @@ static int json_throw_user_call_count = 0; // NOLINT(cppcoreguidelines-avoid-non
#include "doctest_compatibility.h"
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using nlohmann::json;
TEST_CASE("JSON_NO_IO")
{
+2 -2
View File
@@ -33,8 +33,8 @@
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using ordered_json = nlohmann::ordered_json;
using nlohmann::json;
using nlohmann::ordered_json;
#ifdef JSON_TEST_NO_GLOBAL_UDLS
using namespace nlohmann::literals; // NOLINT(google-build-using-namespace)
#endif
+2 -2
View File
@@ -36,8 +36,8 @@
#define JSON_TESTS_PRIVATE
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using ordered_json = nlohmann::ordered_json;
using nlohmann::json;
using nlohmann::ordered_json;
#ifdef JSON_TEST_NO_GLOBAL_UDLS
using namespace nlohmann::literals; // NOLINT(google-build-using-namespace)
#endif
+2 -2
View File
@@ -16,8 +16,8 @@
#include "doctest_compatibility.h"
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using ordered_json = nlohmann::ordered_json;
using nlohmann::json;
using nlohmann::ordered_json;
// JSON_HAS_CPP_20 (do not remove; see note at top of file)
#if JSON_HAS_STD_FORMAT